2,166 views
1 1 vote

Question:

1 Answer

0 0 votes

I Think This will make you more clear....

Ans is ;- 15 20 15 15

edited by
Position:
Show:

Related questions

6 6 votes
3 3 answers
229
229 views
GO Classes asked Jun 16
229 views
What is the output of the following code?#include <stdio.h int fun(int n) { static int step = 1; if (n <= 1) return n; step++; return n + fun(n - step); } int main() { pr...
6 6 votes
3 3 answers
271
271 views
GO Classes asked Jun 15
271 views
What is the output of the following code?#include <stdio.h int fun(int n) { static int x = 0; int y; if (n == 0) return 0; x++; y = fun(n - 1); return y + x; } int main()...
6 6 votes
2 2 answers
248
248 views
GO Classes asked Jun 13
248 views
What is the output of the following code?#include <stdio.h int fun(int n) { static int count = 0; if (n == 0) return count; count = count + n; return fun(n - 1); } int ma...
5 5 votes
3 3 answers
214
214 views
GO Classes asked Jun 11
214 views
What is the output of the following code?#include <stdio.h int add(int n) { static int total = 1; total = total + n; return total; } int main() { int i, ans = 0; for (i =...