Can any one explain what is recursion in programming? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

Can any one explain what is recursion in programming?

7th Oct 2019, 12:10 AM
Luxshan Thuraisingam
Luxshan Thuraisingam - avatar
3 Answers
+ 1
When you call a function within a function . It's called recursion.
11th Oct 2019, 2:03 PM
Methusha Thuraisingam
Methusha Thuraisingam - avatar
+ 1
When function call itself for N number of times. Example: int fact(int n) { if (n < = 1) // base case return 1; else return n*fact(n-1); }
7th Oct 2019, 1:09 AM
Chirag Kumar
Chirag Kumar - avatar
+ 1
Use of loops
7th Oct 2019, 5:44 AM
Mohamed Izad
Mohamed Izad - avatar