int pop(return(stk[top--])int get_type(char cif( ='+| ='-| ='*| ='/'return else return output enter the prefix expression +- result recursion in this section we are going to discuss recursion which is an implicit application of the stack adt recursive function is defined as function that calls itself to solve smaller version of its task until final call is made which does not require call to itself since recursive function repeatedly calls itselfit makes use of the system stack to temporarily store the return address and local variables of the calling function every recursive solution has two major cases they are base casein which the problem is simple enough to be solved directly without making any further calls to the same function recursive casein which first the problem at hand is divided into simpler sub-parts second the function calls itself but with sub-parts of the problem obtained in the first step thirdthe result is obtained by combining the solutions of simpler sub-parts thereforerecursion is defining large and complex problems in terms of smaller and more easily solvable problems in recursive functionsa complex problem is defined in terms of simpler problems and the simplest problem is given explicitly to understand recursive functionslet us take an example of calculating factorial of number to calculate !we multiply the number with factorial of the number that is less than that number in other wordsnn ( - )let us say we need to find the value of this can be written as !where ! therefore similarlywe can also write problem figure solution = = = = = = = = = = = = recursive factorial function expanding further we know the series of problems and solutions can be given as shown in fig now if you look at the problem carefullyyou can see that we can write recursive function to calculate the