0

What is the result of following

void main () { int i=5; i+=i+++i+i++; cout<<i; }

11th Apr 2017, 2:27 AM
hamsa
hamsa - avatar
3 odpowiedzi
+ 7
Undefined behavior. The output varies from different compilers.
11th Apr 2017, 3:31 AM
Mr.Robot
Mr.Robot - avatar
+ 5
Output : 24
11th Apr 2017, 2:46 AM
Pixie
Pixie - avatar
+ 3
just plug it into the code playground....
11th Apr 2017, 2:37 AM
Edward