r/C_Programming • • Jul 10 '26

Question can I skip recursive functions?

a code i can run with the logic of iterative, so why do I have to learn the new concept as complicated as recursive? (ik it's one of important questions in c)

if yes will u pls explain it with a very realistic and simple example

thanks a lot πŸ™

0 Upvotes

64 comments sorted by

View all comments

Show parent comment

3

u/not_a_bot_494 Jul 10 '26

Could you give an example of a problem that we haven't discovered a iterative solution to? The naieve approach to just push all function contents to a (user created) stack should work for all cases?

2

u/AndrewBorg1126 Jul 10 '26

They have shifted their position from "we don't know how" to "it’s just that no one has bothered to write it."