Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

int main()
{
int i ,a[i];
i = 0;
a[i] = 10;
cout<< a[i] << endl;
return 0;


}

What will be output of this program?

Answer Posted / vikas

Index variable of any array should be integer constant.
but in this case i is not constant so it is a error

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is vectorial capacity?

1175


What is difference between malloc()/free() and new/delete?

1175


What is using namespace std in cpp?

1173


What are the operators in c++?

1120


What is anonymous object in c++?

1102


How to declare a pointer to an array of integers?

1145


When do we use copy constructors?

1088


How do you clear a set in c++?

1081


Am studying basic c++ programming, have been given the following assignment. Design a linear program to calculate the maximum stress a material can withstand given a force and a diameter of a circle. To find the required area pi should be defined. Have most of the program sorted out but am at a loss as to how to show the calculations required. Can anyone help?

2202


What is the difference between a reference and a pointer?

1125


Is c++ the hardest programming language?

1139


Why c++ is not a pure oop language?

1052


What is the difference between the parameter to a template and the parameter to a function?

1127


What is implicit pointer in c++?

1094


Explain the use of vtable.

1092