Interviews - C# Corner

Deepak Sharma
What is a recursive function? Write a recursive function.
By Deepak Sharma in ASP.NET onNov 17 2010
  • Suresh Paldia
    Nov, 2010 22

    Definition: A function that call itself is called recursive function.

    Example: factorial of a number.

    int factorial(int number)

    {

          if(number==0)

                return 1;

          else

                return number*factorial(number-1); //call to itself

    }

    • 0

Most Popular Companies

Most Popular Job Functions

MOST LIKED QUESTIONS