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:
void func (int, int); int i = 2; func (i++, i++);
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′.
- Does C support function overloading?
- How can I return multiple values from a function?
- How to Count Variable Numbers of Arguments in C?
- Static functions in C
- Functions in C/C++
- Measure execution time with high precision in C/C++
- Why strcpy and strncpy are not safe to use?
- Applications of Pointers in C/C++
- Communication between two process using signals in C
- Pre-increment and Post-increment in C/C++