NOT ABLE TO FIGURE OUT WHAT IS HAPPENING WITH THE UNIVERSAL ARRAY : I HAVE CREATED A PROGRAM WHICH TAKES AN EQ. FROM THE USER BY ASKING ABOUT THE DEGREE OF THE EQ. AND THEN TAKING THE CO-EFFICIENTS FROM THE USER AND THEN FORMING THE FUNCTION WHICH RESULTS INTO AN EQ. AND THEN I HAVE USED THE BISECTION METHOD TO SOLVE IT.THE PROGRAM IS::

    #include<iostream>
    #include<math.h>
    #include<iomanip>
    using namespace std;
    int stop=0,d,t[]={1};
    float f(float x)
    {
    	int loop,loopa;
    	float add=0.0,sum=0.0;
    	for(;stop==0;)
    	{
    		int p ;
    		cout << "Enter the degree of the poly. eq. (+ve integer)" << endl;
    		cin >> d ;
    		int *t = new int[d+1];
    		cout << "The eq. will be in the form of ax^"<<d<<"+bx^"<<(d-1)<<" and so on ." ;
    		p = 97 + d ;
    		for(loop=d;loop>=0;loop--)
    		{
    			cout << "Enter the value of " << char(p-loop) << endl;
    			cin >> t[loop];
    			cout << "a="<<t[loop]<<endl;
    		}
    		stop=1; //ARRAY IS STILL THERE 				WHY/////
    	}		for(loop=0;loop<=d;loop++)		cout<<"out="<<t[loop]<<endl;
    	//ARRAY IS GONE TILL NOW//
    	cout<<"d="<<d<<endl;
    	for(loopa=d;loopa>=0;loopa--)
    	{
    		cout<<"loopa="<<loopa<<"value="<<t[loopa]<<endl;
    		add = t[loopa] * pow(x,loopa);
    		sum=sum+add;
    	}
    	return sum;
    }
    int main()
    {
    	float a , b , c , i , j ;
    	A:
    	cout << " Enter the starting point of interval " <<endl;
    	cin >> a ;
    	cout << " Enter the end point of interval " << endl;
    	cin >> b ;
    	cout << " Enter the number of iterations to be done . ( More the iterations , accurate is the result ) " << endl;
    	cin >> i ;
    	for(j=0;j<i;j++)
    	{
    		if(f(a)*f(b)>0)
    		{
    			cout << " The root of the above polynomial does not lies in the given interval . TRY AGAIN " << endl;
    			goto A;	
    		}
    		else
    		{
    			c = a + b ;
    			c = c / 2 ;
    			if (f(a)*f(c)>0)	a = c ;
    			else 				b = c ;
    			cout <<"hello"<< a << "aa \t" << b << "\t" << c << endl;
    		}
    	}
    	cout << "Root = "<< c <<endl;
    }
    


WHEN THE USER GIVES THE VALUE OF DEGREE IT CREATES AN ARRAY OF SIZE ONE MORE THAN DEGREE IS CREATED THEN THERE IS A FOR LOOP WHICH TAKES THE VALUE OF CO-EFFICIENTS IN THAT ARRAY . THE PROBLEM IS THE VALUE OF THE ARRAY STAYS INTACT TILL THE FIRST FOR LOOP . BUT AS THE CONTROL PROCEEDS TO THE SECOND LOOP ( SEE THE TWO COMMENTS ) THE VALUE OF THE ARRAY IS GONE...I M USING CODELITE ...GUYS HELP ME?????