Different Forms of Recursion

Get introduced to the concept of recursion with the help of an interactive example.

What is recursion?

When a function calls itself recursion occurs.

The function calling itself could be main( ) or any other function.

Example 1: main() calling itself

Error: The code given below will generate a segmentation fault.

Get hands-on with 1200+ tech skills courses.