what is the difference between recursion and iteration?
shanki himanshu
27
Light Poster
Recommended Answers
Jump to PostIteration is (in essence) just looping.
Recursion is something going back into or calling itself.Recursion can cause Iteration.
[Recursion vs. Iteration]
http://en.wikipedia.org/wiki/Recursion_(computer_science)#Recursion_versus_iteration
Jump to PostIteration is like a while or for loop
for (int i = 0; i < 100; i++)
and recursion is a function calling itself for example:
using namespace std; int function(int a) { if (a == 100) { cout << "\n\n\nResult reached! A = …
All 8 Replies
thines01
401
Postaholic
Team Colleague
Featured Poster
sergent
52
Posting Pro
sergent
52
Posting Pro
sharathg.satya
-10
Posting Whiz in Training
shanki himanshu
27
Light Poster
Narue
5,707
Bad Cop
Team Colleague
TrustyTony
888
pyMod
Team Colleague
Featured Poster
sharathg.satya
-10
Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.