Let x be an integer which can take a value of 0 or 1. The statement if(x = =0)…

GATE · 2004 · IT

Let x be an integer which can take a value of 0 or 1. The statement if(x = =0) x = 1; else x = 0; is equivalent to which one of the following?

  1. A.

    x = 1 + x;

  2. B.

    x = 1 - x;

  3. C.

    x = x - 1;

  4. D.

    x = 1 % x;

Attempted by 960 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…