Interview Questions   Tutorials   Discussions   Programs   Videos   

C++ - Int main() { int i ,a[i]; i = 0; a[i] = 10; cout<< a[i] << endl; return 0; } What will be output of this program?




321
views
asked marvit August 18, 2014 08:51 PM  

Int main() { int i ,a[i]; i = 0; a[i] = 10; cout<< a[i] << endl; return 0; } What will be output of this program?


           

1 Answers



 
answered By bhjahnavi   0  
in c++ the variables are not initialized to zero .so , it prints the value in the program which is wrote just before this program .but this may differ from compiler to compiler.
flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert