Question DSA-BIT-0044
MediumWhat is the output of this code?
x = 0b10110
print(x >> 2, x << 1, x & 0b111, x | 1)
- A.
5 44 7 23
- B.
5 22 6 23
- 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
Bit Manipulation question
What is the output of this code?
x = 0b10110
print(x >> 2, x << 1, x & 0b111, x | 1)
5 44 7 23
5 22 6 23
Sign up free to see the answer and a step-by-step explanation.
11 44 6 22
5 44 6 23