properties of recursion local variables like any other functioneach call to recursive function creates new instances of all local reference variables used within that function changing the contents of local reference variable does not affect the contents of other instances of that variable was made from within the printrev( instance thusexecution returns to the first statement after that invocation after execution returns to the printrev( instancethe end of that function is reached and again execution is returned to the location where that instance was invoked the result is chain of recursive returns or recursive unwinding back to the original printrev( function call what changes would be needed to create recursive function to print the same integer values in increasing order instead of reverse orderwe can change the location of the recursive call to change the behavior of the recursive solution consider new recursive print functiondef printincn )if printincn- printn in this versionthe recursive call is made before the value of is printed the result is series of recursive calls before any other action is performed the actual printing of the values is performed after each instance of the function returnsas illustrated in figure ( properties of recursion all recursive solutions must satisfy three rules or properties recursive solution must contain base case recursive solution must contain recursive case recursive solution must make progress toward the base case recursive solution subdivides problem into smaller versions of itself for problem to be subdividedit typically must consist of data set or term that can be divided into smaller sets or smaller term this subdivision is handled by the recursive case when the function calls itself in the printrev(functionthe recursive case is performed for all values of the base case is the terminating case and represents the smallest subdivision of the problem it signals the end of the virtual loop or recursive calls in printrev()the base case occurred when and the function simply returned without performing any additional operations finallya recursive solution must make progress toward the base case or the recursion will never stop resulting in an infinite virtual loop this progression