Question PSC-BIT-0059
MediumWhat will be the output of the following pseudocode?
Integer s = 0, mask
for (each mask from 0 to 7)
if (mask & 4)
s = s + 1
end if
end for
Print s
- A.
3
- B.
1
- C.
4
- D.
8
Sign up free to see the answer and a step-by-step explanation.