Question PSC-BIT-0070
HardWhat does the following pseudocode print?
Integer n = 100, p = 1
while (p < n)
p = p << 1
end while
Print p, p >> 1
- A.
256 128
- B.
64 32
- 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 = 100, p = 1
while (p < n)
p = p << 1
end while
Print p, p >> 1
256 128
64 32
Sign up free to see the answer and a step-by-step explanation.
128 64
100 50