1
Reply

What is a recursive function? Write a recursive function.

Deepak Sharma

Deepak Sharma

13y
6.7k
0
Reply

    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

    }