What will be the output of the following C++ code?
#include <stdio.h>
#include<iostream>
using namespace std;
int main()
{
int x = 5, y = 5, z;
x = ++x; y = --y;
z = x++ + y--;
cout << z;
return 0;
}
#include <stdio.h>
#include<iostream>
using namespace std;
int main()
{
int x = 5, y = 5, z;
x = ++x; y = --y;
z = x++ + y--;
cout << z;
return 0;
}A. 10
B. 11
C. 9
D. 12
Answer: Option A

Join The Discussion