?
Competitive Exams
Aptitude
English
Verbal Reasoning
Non Verbal Reasoning
General Knowledge(GK)
General Science(GS)
Data Interpretation(DI)
Banking Awareness
Current Affairs
Computer & Programming
Computer Fundamentals
Networking
SQL
Database
C Programming
C++ Programming
Java
Python
Other Subjects
Commerce
Management
Law
Political Science
Psychology
Agriculture
Join the Discussion
Login to post a comment or share your explanation.
LoginLet’s trace the code:
Initially, i = 0
First iteration: ++i → i becomes 1 → prints 1
Second iteration: ++i → i becomes 2 → prints 2
Third iteration: ++i → i becomes 3 → prints 3
Now i = 3, condition i < 3 is false → loop stops
Final output:
1 2 3
The correct answer is Option A (1 2 3).