Skip to content

Beta · Data may be lost.Your data may be reset or lost.

GateBrew
← GATE CSE 2020
Questions

Q46

NAT2 marks

Consider the following C functions.

int fun1(int n) {
    static int i= 0;
    if (n > 0) {
        ++i;
        fun1(n-1);
    }
    return (i);
}
int fun2(int n) {
    static int i= 0;
    if (n>0) {
        i = i+ fun1 (n) ;
        fun2(n-1) ;
    }
    return (i);
}

The return value of fun2(5)\text{fun}2 (5) is _________

Sign in to save attempts.

Solutions and discussion are hidden while you attempt this question. They open once you check or show the answer.