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 / raju
ans 0
first it return value ofter that it increment
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
what are the ways in which a constructors can be called?
Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.
What is oops?what is its use in software engineering?
Give two or more real cenario of virtual function and vertual object
What are the benefits of polymorphism?
What is polymorphism in oops with example?
write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory
What does sksksk mean in text slang?
what is difference between class template and template class?
What is abstraction encapsulation?
What is interface? When and where is it used?
Why is destructor used?
Why do while loop is used?
Why is oop better than procedural?
Which is not an object oriented programming language?