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

2

u/ZookeepergameFew6406 Jul 10 '26

It’s fun untill the stack goes boom xd

1

u/mikeblas Jul 10 '26

It's easy enough to "flatten" the algorithm so you use a stack structure instead of the execution stack.