Program to delete duplicates from a link list

Recursion in c.

what is recursion in c:-

   In programming language whenever any function calls itself then such call are called recursive calls and this phenomena is called recursion.

Example:-

Here in this example function f() is calling itself so it is a recursive call.
 
There are two types of recursion in c or any language based on whether function directly calls itself or it is called via some other function.
 
(1). Direct recursion :-    In direct recursion the recursion call to the function is directly written inside the body of the function.
 

 

(2). Indirect recursion :–  
                                                
In Indirect recursion the recursive Call to the function is not directly written inside the body of the function rather this Call lies inside some other function which is invoked (called) from the base function. The Indirect recursion is show at below.

 

Here f1 function is called by base function f and the recursive call to function f lies in the body of the function f1.
Above are the types of recursion in c programming language.

Recommended Post:

Key points:-

Cracking the coding interview:-

Array and string:-

Tree and graph:-

Hackerearth Problems:-

Hackerrank Problems:-

Data structure:-

 MCQs:-

 

Leave a Reply

Your email address will not be published.