What is the output of the following code:
int v()
{
int m=0;
return m++;
}
int main()
{
cout<<v();
}
1) 1
2) 0
3) Code cannot compile
Answer Posted / shailaja
the output of this code is
0
bcz here the return statement it will stops the execution
and returns to the calling function.
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
Write a program to reverse a string using recursive function?
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?
Why interface is used?
Why do we need oop?
What is difference between inheritance and polymorphism?
if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?
What is persistence in oop?
What is inheritance and how many types of inheritance?
They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?
What is the problem with multiple inheritance?
What is a class and object?
What is multilevel inheritance?
Why is abstraction used?
Is react oop?
What is basic concept of oop?