A

Admin • 833K Points
Coach

Q. What is the output of this program?

Code:
#include <iostream>
using namespace std;
int main()
{
int num1 = 7, num2 = 3, Res;
num1 = ++num1;
num2 = --num2;
Res = num1 + ++num1;
cout << Res;
return 0;
}
  • (A) 7
  • (B) 3
  • (C) 17
  • (D) 18
  • Correct Answer - Option(D)
  • Views: 25
  • 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.