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
How does c++ structure differ from c++ class?
What's the order in which the local objects are destructed?
What are c++ storage classes?
What are the types of array in c++?
What are guid? Why does com need guids?
Write a program using display() function which takes two arguments.
Write a program which uses functions like strcmp(), strcpy()? etc
If a function doesn’t return a value, how do you declare the function?
What is the disadvantage of using a macro?
Which software is best for c++ programming?
Can comments be longer than one line?
What are static type checking?
Write a function to find the nth item from the end of a linked list in a single pass.
What is static in c++?
Why is c++ called oops?