Question PSC-BIT-0074
HardWhat will be printed by the following pseudocode?
Integer x = 5, i
for (each i from 1 to 3)
x = (x << 1) ^ i
end for
Print x
- A.
45
- B.
43
- 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 printed by the following pseudocode?
Integer x = 5, i
for (each i from 1 to 3)
x = (x << 1) ^ i
end for
Print x
45
43
Sign up free to see the answer and a step-by-step explanation.
40
47