The order of evaluation of subexpressions, including
- the arguments of a function call and
- operands of operators (e.g.,
+
,-
,=
,*
,/
), with the exception of:- the binary logical operators (
&&
and||
), - the ternary conditional operator (
?:
), and - the comma operator (
,
)
- the binary logical operators (
is Unspecified
For example
int Hello()
{
return printf("Hello"); /* printf() returns the number of
characters successfully printed by it
*/
}
int World()
{
return printf("World !");
}
int main()
{
int a = Hello() + World(); //might print Hello World! or World! Hello
/** ^
|
Functions can be called in either order
**/
return 0;
}