I am taking a compiler class and was given the equation:
int i = 5, j = 9, k;
k = f(++i) + g(++i) + j + 45;
I made a function for f and g and they both take in (int i) and return i. In the result, f and g both returned i = 7.
I was wondering why f and g both output i = 7, but not f is i = 6 and g is i = 7.
When I run it in Visual Studios, g's output runs first and then f.
Shouldn't f(++i) go first then g(++i)? Since f(++i) appears first from left to right of the equation.?