a is an array, foo is a function, and i is an int.
a
foo
i
int
a[++i] = foo(a[i-1], a[i]);
Would
According to the C Standard (6.5.16 Assignment operators):
Semantics 3 ...The evaluations of the operands are unsequenced.
Semantics
3 ...The evaluations of the operands are unsequenced.
Thus this statement
results in undefined behavior.