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.) Programming in C + – HeadShot 1.4k views answer comment Share Follow Print See all 5 Comments 5 5 Comments reply Magma commented Nov 12, 2018 reply Follow flag 3 0 2 1 2 1 ?? 0 0 replyShare Mk Utkarsh commented Nov 12, 2018 reply Follow flag #include <stdio.h> void run(int n){ int d =0; printf("%d",n); printf("%d",d++); //first d is printed then incremented if(--n > 1) // first decremented then checked run(n--); // decremented after function returns printf("%d",d); } int main(void) { run(3); return 0; } output : 302011 1 1 replyShare HeadShot commented Nov 12, 2018 reply Follow flag 302011 is correct 0 0 replyShare HeadShot commented Nov 12, 2018 reply Follow flag @Mk Utkarsh Will you please solve my mentioned doubt. It ll be a great help :) 0 0 replyShare Mk Utkarsh commented Nov 12, 2018 reply Follow flag post decrement work with recursion as it works with any other statement. first it executes the statement then decrement the value so when Run(2--) is called Run(2) will execute then n-- will happen 1 1 replyShare Please log in or register to add a comment.