+ 4
Can any one explain what is recursion in programming?
3 Respostas
+ 1
When you call a function within a function . It's called recursion.
+ 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);
}
+ 1
Use of loops