1,371 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
436
436 views
GO Classes asked Jun 17
436 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
368
368 views
GO Classes asked Jun 17
368 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
378
378 views
GO Classes asked Jun 16
378 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
370
370 views
GO Classes asked Jun 16
370 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 ...