Suppose Y is an integer variable whose value is either 0 or 1. Which of the following is the equivalent of the statement: if(Y==0)Y=1; else Y=0;?

Suppose Y is an integer variable whose value is either 0 or 1. Which of the following is the equivalent of the statement: if(Y==0)Y=1; else Y=0;?

  1. a) Y=1+Y
  2. b) Y=1-Y
  3. c) Y=Y-1
  4. d) Y=1%Y

From the Sonali Bank Assistant Database Administrator 2020 – Preliminary exam, question 27 of 68.

More from this paper