MCQ
Single Best Answer
Easy
QIf q is 16 and r is 3, what is the result of the expression q >>> r using the unsigned right shift operator in Java?
ID: #20168
Bitwise Operators
82 views
Question Info
#20168Q ID
EasyDifficulty
Bitwise OperatorsTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer: Option B
Explanation
The unsigned right shift operator (>>>) in Java shifts the bits of the left operand to the right by the number of positions specified by the right operand, filling the leftmost bits with zeros. In this case, q >>> r is equivalent to 00010000 >>> 00000011, resulting in 00000010, which is 2 in decimal.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic