

MCQOPTIONS
Saved Bookmarks
1. |
Which of these expressions will return true if the input integer a is a power of two? |
A. | (~a & (a 1)) == 0; |
B. | (a | (a 1)) == 0; |
C. | (a & (a 1)) == 0; |
D. | (a | (a + 1)) == 0; |
E. | None of these |
Answer» D. (a | (a + 1)) == 0; | |