+ 1

#include <iostream> using namespace std; int main() { int x=10; int y=x+++x+++x; cout<<y; return 0; }

25th Feb 2017, 2:40 PM
kumar Saurav
kumar Saurav - avatar
2 ответов
+ 2
y = x++ + x++ + x; y = 10 + 11 + 12; y = 33;
25th Feb 2017, 3:07 PM
Юрий Исаев
Юрий Исаев - avatar
+ 1
different compiler may have different interpretations. evaluation from left to right side x++ + x++ +x 10 + 11 + 12 evaluation from right to left side x+ ++x + ++x 10 + 11 + 12 both produces 33 as result
25th Feb 2017, 3:42 PM
Sizr
Sizr - avatar