Question PSC-LOOP-0076
HardWhat does the following pseudocode print?
Integer n = 64, c = 0, i
for (i = 1; i < n; i = i * 2)
c = c + 1
end for
Print c
- A.
5
- B.
7
- 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
Loops question
What does the following pseudocode print?
Integer n = 64, c = 0, i
for (i = 1; i < n; i = i * 2)
c = c + 1
end for
Print c
5
7
Sign up free to see the answer and a step-by-step explanation.
6
64