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

Is dev c++ free?

612


Differentiate between a constructor and a method in C++.

563


How does atoi function work?

624


Why is it called c++?

587


What are destructors?

573






Define what is constructor?

588


What is the benefit of encapsulation?

594


When should I use unitbuf flag?

592


What are multiple inheritances (virtual inheritance)? What are its advantages and disadvantages?

571


How one would use switch in a program?

613


What is operators in c++?

567


Explain the concept of copy constructor?

621


Specify different types of decision control statements?

357


What methods can be overridden in java?

671


Are c and c++ different?

541