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 / ramesh kumar

in array we can must enter size integer...
not as variable type like i
thats why it gives an error

Is This Answer Correct ?    9 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the role of static keyword for a class member variable?

863


Are iterators pointers?

900


What is different in C++, compare with unix?

813


How can you quickly find the number of elements stored in a static array? Why is it difficult to store linked list in an array?

778


Why null pointer is used?

789


Can we define a constructor as virtual in c++?

820


Is vector a class in c++?

807


What are the methods of exporting a function from a dll?

861


Is arr and &arr are same expression for an array?

810


Why was c++ created?

784


What is set in c++?

846


Is recursion allowed in inline functions?

808


Difference between overloaded functions and overridden functions

824


Can we define function inside main in c++?

772


What is the prototype of printf function?

878