Question PSC-BIT-0075
HardWhat does the following pseudocode print?
Integer n = 255
Integer h = (n >> 4) & 15, l = n & 15
Print h, l, (l << 4) | h
- A.
16 15 255
- B.
15 0 15
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Bitwise Operators question
What does the following pseudocode print?
Integer n = 255
Integer h = (n >> 4) & 15, l = n & 15
Print h, l, (l << 4) | h
16 15 255
15 0 15
Sign up free to see the answer and a step-by-step explanation.
15 15 240
15 15 255