What will the output of the following pseudocode be for i = 140? integer…

PYQ Accenture Hiring Assessment 2024

What will the output of the following pseudocode be for i = 140?

integer fun(int i)
if ((i % 2) != 0)
    return i;
else
    return fun(fun(i = 1));
End function fun()
  1. A.

    1

  2. B.

    2

  3. C.

    3

  4. D.

    0 (Zero)

Attempted by 79 students.

Sign up free to check your answer

Sign up free

Explore the full course: Cdac C Cat Complete Preparation

Loading lesson…