in Education by
int fun(int n) { if(n!=0) { return n – fun(n-5); } else { return n; } } int main(){ int n = 20, z; z = fun(n); printf(“%d”, z); } Select the correct answer from above options

1 Answer

0 votes
by
Answer: output is: 10 Explanation: this programming problem output is 10

Related questions

0 votes
    Q.32 :-What will the SWAP macro in the following program be expanded to on preprocessing? will the code compile? ... y); return 0; Select the correct answer from above options...
asked Nov 30, 2021 in Education by JackTerrance
0 votes
    int find(int j) { if(>1X j=find(j/ 10)+(%10); } else { j=0; return j; void main() int i=1000, int k; k=find(i); printf(“%d”, k); Select the correct answer from above options...
asked Dec 29, 2021 in Education by JackTerrance
0 votes
    Analyse the given program segment and answer the following questions i) write the output of the program segment ii)how many times ... body of the loop gets execute for(int m=5 ; m...
asked Nov 29, 2021 in Education by JackTerrance
0 votes
    int find(int i) { if(>1) j=find(j/10)+(j%10) else j=0; return j; void main() int i=1000 int k k=find(i): printf(“%d”, K) Select the correct answer from above options...
asked Dec 29, 2021 in Education by JackTerrance
0 votes
    What is the output of the below program? #include int main() { printf("%u",sizeof(NULL)); return 0; }...
asked Jan 23, 2021 in Technology by JackTerrance
0 votes
    15. #include #define foo(m, n) m + n int main() { int a = foo(5,13); printf(“%d”, a); Select the correct answer from above options...
asked Dec 30, 2021 in Education by JackTerrance
0 votes
    { int ar[] = { 3, 1, 4, 6, 5 }; int ar_size = sizeof(ar) / sizeof(ar[0]); isTriplet(ar, ar_size) ? cout...
asked Dec 9, 2021 in Education by JackTerrance
0 votes
0 votes
    int x =20, y = 10, z; What is the value of z in z = ++x * (y – –) – y ? Show the steps. Select the correct answer from above options...
asked Dec 24, 2021 in Education by JackTerrance
0 votes
    m 1) Int a=0.b=20; for (int i=20;i>=4;i=i-3) { if(i%21=0 a=a+2; ) b=b+a: predict the value of b after execution Select the correct answer from above options...
asked Nov 27, 2021 in Education by JackTerrance
0 votes
    Int a=0.b=20: for (int i=20:i>=4:i=i-3) { if(i%2!=0) a=a+2: 3 b=b+a: . Select the correct answer from above options...
asked Nov 27, 2021 in Education by JackTerrance
0 votes
    #include int main() { void fib(int f1,int f2, int n) { static int i = 1; int f3; if(i...
asked Dec 19, 2021 in Education by JackTerrance
...