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

Write bites in Turbo c++ Header ("Include") Files.

676


What is the correct syntax for inheritance a) class aclass : public superclass b) class aclass inherit superclass c) class aclass <-superclass

669


What is the difference between a declaration and a definition?

573


When should we use multiple inheritance?

602


What is the use of setfill in c++?

573






What is pure virtual function?

617


How can you say that a template is better than a base class?

574


Should the this pointer can be used in the constructor?

545


Why is c++ so fast?

521


Explain the use of this pointer?

626


When we use Abstract Class and when we use Interface?where we will implement in real time?

1657


How do you compile the source code with your compiler?

603


Explain rethrowing exceptions with an example?

598


What is #include sstream?

611


What is a breakpoint?

551