What will be the output of the following pseudocode? integer a, b, c; set a =…

PYQ Infosys Hiring Test 2024

What will be the output of the following pseudocode?

integer a, b, c;
set a = 11, b = 12, c = 10;
if (b > 0)
    b++
else
    a++
end if
for (each b from 0 to 5)
    a = a + 1
end for
print (a + c)
  1. A.

    27

  2. B.

    22

  3. C.

    24

  4. D.

    20

Attempted by 133 students.

Sign up free to check your answer

Sign up free

Explore the full course: Coding For Placement

Loading lesson…