Question: Did I get this right on this question. What are the values of a, b, c, and d after the following code executes? Here is
Did I get this right on this question. What are the values of a, b, c, and d after the following code executes?
Here is the code and the outputs I received.
#include
using namespace std;
int main()
{
int a = 5;
int b = ++a;
int c = 5;
int d = c++;
cout << a << endl;
cout << b << endl;
cout << c << endl;
cout << d << endl;
return 0;
}
Outputs where: 6,6,6,5
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
