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
Is it possible to have a recursive inline function in c++?
What are manipulators in c++ with example?
How does work in c++?
What is oop in c++?
What is a multiset c++?
List the advantages of inheritance.
What is the difference between an enumeration and a set of pre-processor # defines?
Distinguish between a # include and #define.
What is the use of register keyword with the variables?
When there is a global variable and local variable with the same name, how will you access the global variable?
What is a literal in c++?
Give example of a pure virtual function in c++?
Specify different types of decision control statements?
Why should we use null or zero in a program?
What is split a string in c++?