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

How to allocate memory dynamically for a reference?

813


On throwing an exception by the animal constructor in p = new animalq, can memory leak occur?

896


What is a class definition?

825


What is lazy initialization in c++?

865


How is new() different from malloc()?

869


Arrange Doubly linked list in the ascending order of its integral value and replace integer 5 with 7?

3937


Do you know about latest advancements in C++ ?

883


What is const in c++?

834


Write a program in c++ to print the numbers from n to n2 except 5 and its multiples

2270


What is double in c++?

834


Write about the retrieval of n number of objects during the process of delete[]p?

806


What are the extraction and insertion operators in c++?

791


Describe linked list using C++ with an example.

875


What is an operator in c++?

818


How delete [] is different from delete?

801