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

Index variable of any array should be integer constant.
but in this case i is not constant so it is a error

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you explicitly call a destructor on a local variable?

602


Is c++ a good first language to learn?

576


Who created c++?

579


What are special characters c++?

565


Define private, protected and public access control.

609






Is there a sort function in c++?

551


Explain what is oop?

619


What are arithmetic operators?

539


Explain the difference between overloading and overriding?

614


What is the extension of c++?

514


How can I improve my c++ skills?

556


Can the creation of operator** is allowed to perform the to-the-power-of operations?

582


What is dynamic and static typing?

675


How a pointer differs from a reference?

692


Does improper inheritance have a potential to wreck a project?

630