coding Test👱👦 

Can you guess the output at f(1)?

#include<stdio.h>

#include<conio.h>

int main()

{

int f(int n) 

static int i = 1; 

if (n >= 5) 

return n; 

n = n+i; 

i++; 

return f(n); 

}

} 

Output:

7


,p);

2 Comments

  1. initially what is the value of n ...
    For out put 7 , the value of n have to initiate with 0.

    ReplyDelete
  2. Bro you have to calculate the value at f(1).

    ReplyDelete

Post a Comment

Previous Post Next Post