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
Differentiate between an external iterator and an internal iterator? What is the advantage of an external iterator.
What is data hiding c++?
What is c++ try block?
What are the stages in the development cycle?
What are the basic data types used in c++?
Write a program using shift_half( ) function to shift the elements of first half array to second half and vice versa.
What is #include iostream in c++?
What are its advantages and disadvantages of multiple inheritances (virtual inheritance)?
Explain rethrowing exceptions with an example?
What is the main use of c++?
What is pointer to array in c++?
What are c++ tokens?
How can you prevent accessing of the private parts of my class by other programmers (violating encapsulation)?
What is singleton class in c++?
What is singleton pattern in c++?