int main()
{
int i ,a[i];
i = 0;
a[i] = 10;
cout<< a[i] << endl;
return 0;


}

What will be output of this program?

Answers were Sorted based on User's Feedback



int main() { int i ,a[i]; i = 0; a[i] = 10; cout<< a[i] << endl; return 0; } ..

Answer / ram

main method cannot return any value.

Is This Answer Correct ?    6 Yes 28 No

Post New Answer

More C++ General Interview Questions

Why do we need runtime polymorphism in c++?

0 Answers  


What is the default access level?

0 Answers  


What is c++ good for?

0 Answers  


How can you quickly find the number of elements stored in a a) static array b) dynamic array ?

5 Answers   Lucent,


What is the difference between Pointer and a Reference? When you would use them?

4 Answers   Wipro,






Which algorithm do you like the most? Why?

2 Answers   Google,


Write a function to find the nth item from the end of a linked list in a single pass.

0 Answers   Huawei,


Explain dangling pointer.

0 Answers  


Do the names of parameters have to agree in the prototype, definition, and call to the function?

0 Answers  


Can we define function inside main in c++?

0 Answers  


Why do C++ compilers need name mangling?

3 Answers   Lucent,


Is swift better than c++?

0 Answers  


Categories