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

Write about the various sections of the executable image?

570


Explain register storage specifier.

586


You want to link a c++ program to c functions. How would you do it?

535


Is linux written in c or c++?

545


What is the cout in c++?

547






write a program that withdrawals,deposits,balance check,shows mini statement. (using functions,pointers and arrays)

1804


Describe friend function & its advantages.

708


How do you add an element to a set in c++?

547


What is an adjust field format flag?

641


What is the difference between #import and #include?

543


Can turbo c++ run c program?

624


What are pointers, when declared, intialized to a) NULL b) Newly allocated memory c) Nothing. Its random

647


Do you need a main function in c++?

551


What are stacks?

605


What is called array?

617