🎴 Flashcard Mode

General Knowledge Trivia Mix

Card1 / 20
Mastered0
Review0
QuestionClick to flip

What will be printed as the result of the operation below: main() { int x=20,y=35; x=y++ + x++; y= ++y + ++x; printf(“%d%dn”,x,y); }

AnswerClick to flip back
A
57,94
💡 Explanation:

x=y++ + x++: x = 35 + 20 = 55, then y becomes 36, x becomes 56. y= ++y + ++x: y increments to 37 first, x increments to 57 first, so y = 37 + 57 = 94. Final output: 57 94. Requires understanding pre and post increment.

Change Mode