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
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 does the keyword "static" mean?
What is multilevel inheritance explain with example?
diff between Abstract class Interfaces?
#include <iostream> using namespace std; struct wow { int x; }; int main() { wow a; wow *b; a.x = 22; b = &a; a.x = 23; cout << b->x; return 0; }
why constructor cannt be declar virtually? why destructor cannt be overloaded?
who is the father of OPPS
Why is polymorphism used?
Why it is called runtime polymorphism?
What language is oop?
why c++ is a highlevel language
3 Answers Satyam, Tech Mahindra,
how to find the correct email address format by using the programe?
write a progra in c++ using class & object to find out wheather a given no. is prim or not.