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 |
Iam doing my project on instant messaging , if you any new ideas regarding this project ,please suggest it?
What is the use of fflush(stdin) in c++?
Name an advantage of array over linked list?
24 Answers GML, IBM, Software Solutions,
What is abstraction encapsulation?
How do you define a class in oop?
What is virtual constructors/destructors?
What is Inheritance, Multiple Inheritance, Shared and Repeatable Inheritance?
to find out the minimum of two integer number of two different classes using friend function
when to use 'mutable' keyword and when to use 'const cast' in c++
C#.net Interview Question A=10 B=5 C=A+B Print C The above will be given in a multiline textbox. You need to parse the above input, store values for A,B&c. And you have to display the value of C.
What does I oop mean?
Have you ever used threads?