1 flag 1,923 views
4 4 votes

The sum of all values printed by Rec (6) is _______.

  • 🚩 Duplicate | 👮 nirmal_aravind | 💬 “https://gateoverflow.in/196616/madeeasy-test-series-2018-programming-%26-ds-recursion”

Please log in or register to answer this question.

Position:
Show:

Related questions

9 9 votes
3 3 answers
443
443 views
GO Classes asked Jun 17
443 views
What is the output of the following code?#include <stdio.h void update(int n, int *p) { if (n <= 0) return; *p = *p + n; update(n - 2, p); *p = *p + n; } int main() { int...
6 6 votes
2 2 answers
373
373 views
GO Classes asked Jun 17
373 views
What is the output of the following code?#include <stdio.h int fun(int n) { int x = n; if (n <= 0) return 0; x = x + 2; return x + fun(n - 2); } int main() { printf("%d",...
5 5 votes
4 4 answers
385
385 views
GO Classes asked Jun 16
385 views
What is the output of the following code?#include <stdio.h void g(int n); void f(int n) { if (n <= 0) return; printf("F%d ", n); g(n - 1); printf("f%d ", n); } void g(int...
6 6 votes
3 3 answers
377
377 views
GO Classes asked Jun 16
377 views
What is the output of the following code?#include <stdio.h void fun(int n) { static int x = 0; if (n == 0) return; x++; printf("%d:%d ", n, x); fun(n - 1); printf("%d:%d ...