Question 49 of 65Pseudocodepseudocode recursion

What will be the output of the following pseudocode?

Integer fun(Integer n)
    if (n < 2)
        return n + 1
    End if
    return fun(n - 1) + fun(n - 2) + n
End function

Print fun(5)

The verified answer and full solution are one login away

Every answer here is machine verified, with a step-by-step solution that teaches the method. Your login also unlocks this full mock in the real exam interface.

Log in to see the answer
← Q48Q50 →Attempt the full timed mock
What will be the output of the following pseudocode? [code] | Infosys SE Mock Test 1 | Classic Technology