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); }

5th Nov 2018, 5:04 AM
Prem Patel
Prem Patel - avatar
2 Respuestas
+ 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
5th Nov 2018, 9:08 AM
Flandre Scarlet
Flandre Scarlet - avatar
0
110 and 112 answer is there in this question
24th Nov 2023, 6:30 PM
Vedant Walke
Vedant Walke - avatar