printf using stack? [duplicate]-Collection of common programming errors
There is no guarantee whether c
on the left, or c++
on the right, will be evaluated first.
The order of evaluation of function parameters is Unspecifeid and hence Undefined Behavior as per the standard.
As per Section 1.9 of the C++ standard:
“Certain other aspects and operations of the abstract machine are described in this International Standard as unspecified
(for example, order of evaluation of arguments to a function
). Where possible, this International Standard defines a set of allowable behaviors. These define the nondeterministic aspects of the abstract machine.”
Originally posted 2013-11-10 00:13:05.