Step 5 of 6
Prefix vs postfix ++
x++ and ++x both add 1 to x, but they differ when used inside a bigger expression:
x++(postfix) gives the old value, then increments.++x(prefix) increments first, then gives the new value.
int a = 5;
int b = a++; // b = 5, a = 6
int c = ++a; // a = 7, c = 7
Your turn: make the program print 5 7 7 by choosing prefix or postfix for each blank. The variable a starts at 5.