I want to see if I'm doing this correctly let me know if I'm right and if I'm not can someone give me an explanation. Thank you. What does the code below print?
int n = -1;
// n increments after so now n stays at -1 now int k = 3 then n went from -1 to 0
// (increments after, adds 1)
int k = n++ * -3;
// Now n increments before execution so from the result of n++ which was 0 you increment
// before, add 1. So now n = 1 * 4 + 3 which is 7.
cout << ++n * 4 + k;
Answer is: 7
Am I doing this the correct way??