It is compiler dependent in C. It is never safe to depend on the order of evaluation of side effects. For example, a function call like below may very well behave differently from one compiler to another:
There is no guarantee (in either the C or the C++ standard language definitions) that the increments will be evaluated in any particular order. Either increment might happen first. func might get the arguments `2, 3′, or it might get `3, 2′, or even `2, 2′.
- Functions in C/C++
- Implicit return type int in C
- What happens when a function is called before its declaration in C?
- Importance of function prototype in C
- Functions that are executed before and after main() in C
- return statement vs exit() in main()
- How to Count Variable Numbers of Arguments in C?
- G-Fact 9
- exit(), abort() and assert()
- Can we use function on left side of an expression in C and C++?
- How are variables scoped in C - Static or Dynamic?
- Static functions in C
- What is the purpose of a function prototype?
- How can I return multiple values from a function?
- Does C support function overloading?