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 the difference between strcpy() and strncpy()?
Explain the difference between c & c++?
Which is best c++ or java?
What does new return if there is insufficient memory to make your new object?
Can you use the function fprintf() to display the output on the screen?
Is map ordered c++?
What operator is used to access a struct through a pointer a) >> b) -> c) *
Explain virtual destructor?
What does it mean to declare a member variable as static?
What do you mean by inheritance in c++? Explain its types.
What are default parameters? How are they evaluated in c++ function?
What is an inclusion guard?
What do you mean by function overriding & function overloading in c++?
What is polymorphism & list its types in c++?
Is python better than c++?