πŸ“Š JAVA
Q. Which of these statements are incorrect?
  • (A) The right shift operator, >>, shifts all of the bits in a value to the right specified number of times
  • (B) The right shift operator automatically fills the higher order bits with 0
  • (C) The left shift operator, <<, shifts all of the bits in a value to the left specified number of times
  • (D) The left shift operator can be used as an alternative to multiplying by 2
πŸ’¬ Discuss
βœ… Correct Answer: (B) The right shift operator automatically fills the higher order bits with 0

Explanation: The right shift operator automatically fills the higher order bit with its previous contents each time a shift occurs. This also preserves the sign of the value.

Explanation by: Rajeev Malhotra
The right shift operator automatically fills the higher order bit with its previous contents each time a shift occurs. This also preserves the sign of the value.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
334
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Rajeev Malhotra
Publisher
πŸ“ˆ
80%
Success Rate