C Programming - Functions - Discussion


Usually recursion works slower than loops.

[A]. Yes
[B]. No

Answer: Option A


When a recursive call is made, the function/process clones itself and then process that funtion. This leads to time and space constrains.

In a loop, there is no recursive call involved that saves a lot of time and space too.

Mohith said: (Apr 14, 2014)  
If you're using a functional language, recursion might be faster. If you're using an imperative language, iteration is probably faster.

But in general we say recursion is faster than loops.

Chattrawit said: (Sep 22, 2015)  
I agree with @Mohith since I have tested with C, Python I found that recursive is faster than loops.

Anand said: (Aug 5, 2016)  
Recursive is faster than loops.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.