+ 5

Question regarding ++ in c

I know that in standard C the output of this program is undefined. because : If you modify a variable more than one time in a single statement the behavior is undefined according to the C standard. But I dont know how the output here is 8: https://code.sololearn.com/c4LjmIywtQKl/#c

27th Oct 2018, 2:32 PM
Sagheb
Sagheb - avatar
1 Answer
+ 3
If i remember correctly this is not more the standard. The operators used in code have preference well been defined, so you cannot have a double interpretation that causes undefined behavior. Probably this was the standard in first's compilers versions of C language,
27th Oct 2018, 5:09 PM
Anya
Anya - avatar