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
Can you explicitly call a destructor on a local variable?
Is c++ a good first language to learn?
Who created c++?
What are special characters c++?
Define private, protected and public access control.
Is there a sort function in c++?
Explain what is oop?
What are arithmetic operators?
Explain the difference between overloading and overriding?
What is the extension of c++?
How can I improve my c++ skills?
Can the creation of operator** is allowed to perform the to-the-power-of operations?
What is dynamic and static typing?
How a pointer differs from a reference?
Does improper inheritance have a potential to wreck a project?