What will be the output of the following ‘C’ code? for (i = 1; i < 5; i++) if…

2025

What will be the output of the following ‘C’ code?

for (i = 1; i < 5; i++)

if (i != 3)

printf ("%d", i);

Answer: C. Error

  1. A.

    1245

  2. B.

    0000

  3. C.

    Error

  4. D.

    12345

Attempted by 473 students.

Show answer & explanation

Correct answer: C

Explore the full course: Up Lt Grade Assistant Teacher 2025

Loading lesson…