What value would the following function return for the input x=95 ? function…

GATE · 1998 · CS · Question 2 subparts

What value would the following function return for the input x=95 ?

function fun (x:integer):integer;

Begin

  If x >100 then fun = x-10

  Else fun = fun(fun( x+11))

End;

  1. A.

    89

  2. B.

    90

  3. C.

    91

  4. D.

    92

Attempted by 343 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…