Question PSC-BIT-0054
MediumWhat will be the output of the following pseudocode?
Integer x = 1, i
for (each i from 1 to 5)
x = (x << 1) + 1
end for
Print x
- A.
64
- B.
63
- 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 will be the output of the following pseudocode?
Integer x = 1, i
for (each i from 1 to 5)
x = (x << 1) + 1
end for
Print x
64
63
Sign up free to see the answer and a step-by-step explanation.
31
32