🎴 Flashcard Mode

Programming Languages Quiz: C, Java, and RPG

Card1 / 20
Mastered0
Review0
QuestionClick to flip

Find the output of this program. main() { int i=5; printf(“%d”,i=++i ==6); }

AnswerClick to flip back
A
1
💡 Explanation:

The expression i=++i ==6 has two parts: ++i increments i to 6, then the comparison 6==6 evaluates to 1 (true). The assignment i=1 stores 1 in i. printf outputs 1. The claimed answer B is correct.

Change Mode