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 / mohammed afroz

There are compile time error in this program. Because array
can declare with a constant value.

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why null pointer is used?

584


Define copy constructor.

622


What is exception handling? Does c++ support exception handling?

591


Tell me can a pure virtual function have an implementation?

558


What is the syntax for a for loop?

603






Where Malloc(), Calloc(), and realloc() does get memory?

614


What is general form of pure virtual function? Explain?

515


What is the difference between an array and a list?

588


What are inline functions? What is the syntax for defining an inline function?

583


What is object in c++ wikipedia?

574


Why is c++ difficult?

616


Why do we use setw in c++?

648


What is the use of structure in c++?

555


What things would you remember while making an interface?

566


Write a struct time where integer m, h, s are its members?

524