1,373 views
0 0 votes

Explain how post decrement works in recursion , in which iteration that decremented value is used.

(In general how to use post decrement in recursive function calls when control jumps from one space to other, where that value actually get reflected.)

 

Please log in or register to answer this question.

Position:
Show:

Related questions

9 9 votes
3 3 answers
442
442 views
GO Classes asked Jun 17
442 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
372
372 views
GO Classes asked Jun 17
372 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
384
384 views
GO Classes asked Jun 16
384 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
376
376 views
GO Classes asked Jun 16
376 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 ...