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 / sachinmundhra

This will not get compile.

int i , a[i] ; // This statement will given error. Constant
expression required.

Is This Answer Correct ?    38 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the benefits of c++?

815


why is c++ called oops? Explain

837


Does c++ have foreach?

761


What is an html tag?

858


Explain the advantages of using friend classes.

866


When do you call copy constructors?

898


What are the unique features of C++.

808


When does a 'this' pointer get created?

852


Explain the use of vtable.

856


Difference between pointer to constant and constant pointer to a constant. Give example.

885


Discuss the possibilities related to the termination of a program before entering the mainq method?

757


What methods can be overridden in java?

967


Is it possible to have a recursive inline function in c++?

798


What is a loop? What are different types of loops in c++?

882


Which is the best c++ compiler?

809