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
Answers were Sorted based on User's Feedback
Answer / 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 |
What is a scope operator and tell me its functionality?
I hv a same function name,arguments in both base class and dervied class, but the return type is different. Can we call this as a function overloading? Explain?
What is class and object with example?
Prepare me a program for the animation of train
What is virtual function?where and when is it used?
write a short note on Overloading of Binary Operator?
What is destructor oops?
What is ambiguity in inheritance?
What is the use of fflush(stdin) in c++?
What is difference between pop and oop?
Give two or more real cenario of virtual function and vertual object
What is persistence in oop?