DEV Community

loading...

Discussion on: Is "C Programming language" Still Worth Learning in 2021?

pentacular profile image
pentacular

The increment must happen before the print, as there is a sequence point between the evaluation of the arguments and the call.

But there are no sequence points between the evaluations of the arguments.

Leading to undefined behavior of the case that "Between two sequence points, an object is modified more than once, or is modified and the prior value is read other than to determine the value to be stored."

Thread Thread
stokesm profile image
Matthew Stokes

Thanks for clarifying! That makes more sense.