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
What is a wchar_t in c++?
What is the best c++ book?
How const int *ourpointer differs from int const *ourpointer?
What is the array and initializing arrays in c++?
How do you show the declaration of a virtual constructor?
What is problem with overriding functions?
What is rtti in c++?
Is swift a good first language?
Which operator cannot overload?
What are friend functions in C++?
What is nested class in c++?
What is function overloading in C++?
What is c++ coding?
Write a short code using c++ to print out all odd number from 1 to 100 using a for loop
Where are setjmp and longjmp used in c++?