Consider the following pseudocode: x :=1; i :=1; while (x ≤ 500) begin x :=2x…

ISRO Scientist/Engineer SC 2011



Consider the following pseudocode: 

x :=1;
i :=1;
while (x ≤ 500)
begin
x :=2x ;
i :=i+1;
end

What is the value of i at the end of the pseudocode?

  1. A.

    4

  2. B.

    5

  3. C.

    6

  4. D.

    7

Attempted by 994 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…