Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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

Answers were Sorted based on User's Feedback



What is the output of the following code: int v() { int m=0; return m++; } int main() { cou..

Answer / 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

What is the output of the following code: int v() { int m=0; return m++; } int main() { cou..

Answer / sivasankar

output is 0

Is This Answer Correct ?    7 Yes 1 No

What is the output of the following code: int v() { int m=0; return m++; } int main() { cou..

Answer / raju

ans 0

first it return value ofter that it increment

Is This Answer Correct ?    3 Yes 2 No

What is the output of the following code: int v() { int m=0; return m++; } int main() { cou..

Answer / durga shankar mishra

write answer of the 0

Is This Answer Correct ?    0 Yes 1 No

Post New Answer



More OOPS Interview Questions

Who invented oop?

0 Answers  


In which cases you use override and new base?

2 Answers  


What is the fundamental idea of oop?

0 Answers  


what is the drawback of classical methods in oops?

0 Answers  


what are the disadvantages of C++?

25 Answers   ATS, Infosys, UNI, Wipro,






You attempt to query the data base with this command: SELECT name, salary FROM employee WHERE salary=(SELECT salary FROM employee WHERE last name='Wagner' OR dept no=233) Choose most appropriate option from the following: 1)Sub-queries are not allowed in the where clause. 2)a multiple row sub-query used with a single row comparison operator. 3)a single row query is used with a multiple row comparison operator.

10 Answers   Zycus Infotech,


what is difference between String s=new String("vali"); String s="vali"

1 Answers  


Whats oop mean?

0 Answers  


Write a program to multiply 3x3 matrics

1 Answers  


Write a program to reverse a string using recursive function?

0 Answers   TCS,


different types of castings

3 Answers   Siemens,


how to find the largest of given numbers in an array

2 Answers  






Categories