Vidyalelo
C++ Programming · Q90

Variables and Data Types in C++

Programming · C++ Programming · question 90

Q90

Which of these expressions will isolate the rightmost set bit?

A.
x = x & (~x)
B.
x = x ^ (~x)
C.
x = x & (-x)
Answer
D.
x = x ^ (-x)

Answer: Option C

Solution

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