Question PSC-LOOP-0057
MediumWhat is the output of this pseudocode?
Integer i = 1, c = 0
while (i < 1000)
i = i * 2
c = c + 1
end while
Print c
- A.
1000
- B.
10
- 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 is the output of this pseudocode?
Integer i = 1, c = 0
while (i < 1000)
i = i * 2
c = c + 1
end while
Print c
1000
10
Sign up free to see the answer and a step-by-step explanation.
9
11