+ 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
3 Respostas
+ 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++.
+ 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.
+ 1
thanks guys