0

Why turbo C++ and sololearn gives different output ?

https://code.sololearn.com/cMK2p0989IJS/?ref=app The code mentioned above gives different outputs on Turbo c++ and Sololearn, why ?

3rd Mar 2018, 5:42 PM
Himanshu Kumar
Himanshu Kumar - avatar
1 Answer
+ 4
Undefined behaviour. There are many things which result in this. In your case it's multiple uses of increment operators in a single code sequence. Take a look at other reasons and avoid them: http://en.cppreference.com/w/cpp/language/ub
3rd Mar 2018, 5:45 PM
Alex
Alex - avatar