Function calls can be recursive. This means that the function can actually call itself. There are many situations where this is necessary or useful to cut down on the complexity of code needed to perform the desired action.

For example, the following function computes the factorial of a number:

// Function to compute the factorial of a number.
function int Factorial( int Number )

if( Number <= 0 )
      return 1;
      return Number * Factorial( Number - 1 );
Designed By Blogger Templates | Templatelib & Distributed By Blogspot Templates