The for loop for (i=0; i<10; ++i) printf("%d", i&1); prints:

ISRO Scientist/Engineer SC 2015Modified — slightly modified from the official paper; see the solution

The for loop

for (i=0; i<10; ++i)
printf("%d", i&1);

prints:

  1. A.

    0101010101

  2. B.

    0111111111

  3. C.

    0000000000

  4. D.

    1111111111

Attempted by 1376 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…