0
What is the output of this code and explain plz
Main() { Int x=100; Printf("%d/n",10 + x++); Printf("%d/n",10+ ++x); }
2 Answers
+ 3
First, all words here should be lowercases
Second, I think you mean "\n", not "/n"
int x = 100; // x = 100
"printf("%d\n", 10 + x++)" means we print 10+x first, then x plus 1
=> print 110, x become 101
"printf("%d\n", 10 + ++x)" means x plus 1 first them print 10+x
=> x become 102, print 112
Output:
110
112
0
110 and 112 answer is there in this question