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 / raju
ans 0
first it return value ofter that it increment
Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
Can main method override?
What language is oop?
What is object in oop?
How oops is better than procedural?
How many human genes are polymorphic?
What are two types of polymorphism?
what are the ways in which a constructors can be called?
Why multiple inheritance is not allowed?
What are the 3 principles of oop?
What is a class and object?
What is abstraction and encapsulation?
What is difference between oop and pop?
INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?
What do you mean by abstraction?
What is the purpose of polymorphism?