Tuesday, July 9, 2019

c interview question24

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int a=7,b=8;
    printf("%d\n",fune(a,b)) ;
    return 0;
}

fune(int x,int y)
{
    if (x==0)
        return y;
    else
        fune(--x, ++y);
}


output::
15

No comments:

Post a Comment

python class topic video