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
What is the types of inheritance?
What is abstract class in oop?
Why do we use inheritance?
How can you overcome the diamond problem in inheritance?
What is cohesion in oop?
just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.
what are the ways in which a constructors can be called?
Why is there no multiple inheritance?
Why is oop useful?
What is static in oop?
What is abstract class in oops?
How many human genes are polymorphic?
Why multiple inheritance is not possible?
What do you mean by Encapsulation?
How do you define a class in oop?