+ 2

What is the practical use of recursion in a c++ program?

Well I quite didn't understand what recursion is but I would like to know the uses of recursion program in c++ and also if this is an important topic or if I could just leave this out.. or if someone could explain I would be grateful . thank you

12th Aug 2016, 5:46 PM
Kevin Jacob
3 Respuestas
+ 6
recursion is used to find factorial of a no,fibonacci series,performing permutation and combination,performing stack operation etc. it just shortens the length of program. it's a topic difficult to grasp,but it's not like if you leave it you won't be able to learn c++.
13th Aug 2016, 6:25 AM
kamal joshi
kamal joshi - avatar
+ 4
Some tasks are inherently recursive. Like traversing a tree. Some programmers like myself like to write recursive programs for small datasets as they are logically easier to write. If you get stuck reading their code you will have no clue if you don't understand recursion.
12th Aug 2016, 8:24 PM
sidharth arora
sidharth arora - avatar
+ 1
thanks guys
13th Aug 2016, 7:55 AM
Kevin Jacob