0
Operations C
in a function whats the diferrence between ++x or x++.
1 Réponse
+ 1
++x first increases x by 1 and then gives back x.
x++ first gives back x and then increases it by 1.
int x = 5;
int y = ++x; /* ++x -> x is now 6, so y is also 6 */
x = 5;
y = x++; /* x is 6 again, but y is now 5 */