GATEverse
← GATE CSE 2017 Set 1

Q36

MCQ2 marks, −0.67

Consider the C functions foo and bar given below: int foo(int val) { int x=0; while(val > 0) { x = x + foo(val--); } return val; } int bar(int val) { int x = 0; while(val > 0) { x= x + bar(val-1); } return val; } Invocations of foo(3)foo(3) and bar(3)bar(3) will result in:

Sign in to save attempts.

Loading…