-
What is the output of this program?
#include <iostream>
using namespace std;
int main()
{
int num1 = 10, num2 = 12;
cout << ++num1 <<" "<< --num2 << endl;
return 0;
}
-
- 10 12
- 12 10
- 11 11
- Compilation Error
- None of these
Correct Option: C
The values will be pre increment and pre decrement, So it will print as 11 11.