Draw a memory diagram of the variables of the following code after the execution of the code. Please draw in form of array
auto x = 3,
y = -1; ++x; y--;
auto z = 2 * (x + y);
x = z / y;
y = 1 - x;
Memory diagram of variable is a diagramatical representation of variable state at given time.
After the execution of above code final values will be
x=(-2)
y=3
z=4
Memory diagram:
I hope my answer met all your requirements.In case of any doubt do ask in comment.
THANK YOU!
Get Answers For Free
Most questions answered within 1 hours.