A

Admin • 833.24K Points
Coach

Q. What is the output of this program?

Code:
#include <iostream>
using namespace std;
int main()
{
int num1 = 7;
int num2 = 4;
int num3 = 6;
num1 = num2++;
num2 = --num3;
cout << num1 <<" " << num2 <<" " << num3;
return 0;
}
  • (A) 5 4 5
  • (B) 5 5 4
  • (C) 4 5 5
  • (D) Compilation Error
  • Correct Answer - Option(C)
  • Views: 38
  • Filed under category C++
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.