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?

586


what's the basic's in dot net

1738


What is encapsulation process?

578


assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).

1662


Which is better struts or spring?

620






Which is not an object oriented programming language?

539


What is persistence in oop?

670


Why is destructor used?

582


Can a destructor be called directly?

599


Get me a number puzzle game-program

1694


Explain the advantages of inheritance.

673


What does I oop mean?

616


Why do we need polymorphism in c#?

684


How long to learn object oriented programming?

563


Please send ford technologies placement paper 2 my mail id

1654