The problem of the return value of the self-increasing and self-subtracting operator in C language.

topic description


c

cC217

vs2017:
-sharpinclude
int main(){


}

5191215
4201015

expect the boss to give a reasonable explanation. Whether
is a problem with my compiler or not.

C
May.07,2022
Side effects of

expressions learn about


this is an undefined behavior.
if the parameters are evaluated from right to left, then the answer given by your compiler is correct. My compiler is also evaluated from right to left.


each question in the book is independent and not affected by each other;
but according to your code, the four questions will affect each other, and it is also related to the order of printf evaluation


results in my Macbook environment:

5 19 12 15
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3c2a7-2c2fb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3c2a7-2c2fb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?