-
What is the output of this program?
#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;
}
-
- 5 4 5
- 5 5 4
- 4 5 5
- Compilation Error
- None of these
Correct Option: C
In this program, We are pre increment and post incrementing the operands and saving it.