Vidyalelo
C++ Programming · Q111

Variables and Data Types in C++

Programming · C++ Programming · question 111

Q111

Which of these expressions will make the rightmost set bit zero in an input integer x?

A.
x = x | (x-1)
B.
x = x & (x-1)
Answer
C.
x = x | (x+1)
D.
x = x & (x+2)

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board