Test: Computer Science

// ^ is Exclusive-Or (XOR) operator 

x = x ^ y

y = x ^ y

x = x ^ y

1.

What is the effect of the above snippet of code?

The values are switched.

None of the other answers is true.

 The bits of x and y are negated.

The values are the same.

x is equal to y

1/3 questions

0%
Learning Tools by Varsity Tutors