FORTRAN Questions and Answers

Explain how recursion is used in Fortran?

When one function calls to another function or itself, in a defined area of call is called recursion.
• It is denoted as subroutine as well, and it has the scope of the stack that directly supports the subroutines
• The return location on the stack that uses the subroutine is fixed and is adjacent to the subroutine code
• To call a function within a function recursion is used, and it allows easy calling of the function and minimizes writing of the code