Important MCQ

for(int i=1;i<=3;i++) cout<<i*i; prints

Q.for(int i=1;i<=3;i++) cout<
A) 149
B) 111
C) 369
D) 123
Correct Answer:
Option A
Detailed Explanation:
A) 149 is correct. Apply the relevant C++ rules: integer versus floating-point division, remainder, operator precedence, loop execution, ternary selection, data types, and the syntax of main().