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


Please Help Members By Posting Answers For Below Questions

What is the point of polymorphism?

799


What is the difference between encapsulation and polymorphism?

867


What is stream in oop?

1061


What is the real time example of inheritance?

888


Can static class have constructor?

811


How to call a non virtual function in the derived class by using base class pointer

5966


What are benefits of oop?

903


write knight tour problem which is present in datastructure

2403


What do you mean by abstraction?

845


What does I oop mean?

857


How do you define a class in oop?

881


hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.

1760


What is the renewal class?

2447


What is abstraction and encapsulation?

792


Can main method override?

861