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 highest level of cohesion?

566


Why is polymorphism needed?

583


How do you answer polymorphism?

570


What is pointer in oop?

528


What is the difference between encapsulation and polymorphism?

580






Can destructor be overloaded?

588


What is object-oriented programming? Webopedia definition

706


write a program to find 2 power of a 5digit number with out using big int and exponent ?

1882


What is static in oop?

584


What causes polymorphism?

563


Can an interface inherit a class?

550


Can you name some types of inheritance?

629


Can you inherit a private class?

626


How many human genes are polymorphic?

564


What does and I oop mean?

607