Question PSC-BIT-0006
EasyWhat will be the output of the following pseudocode?
Integer x = 100
Print x >> 2
- A.
98
- B.
25
- C.
Show answer and explanation
Answer: B
Shifting right by 2 divides by 4 (dropping any remainder): 25.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Bitwise Operators question
What will be the output of the following pseudocode?
Integer x = 100
Print x >> 2
98
25
Answer: B
Shifting right by 2 divides by 4 (dropping any remainder): 25.
50
400