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/XipXoom Jul 10 '26

In fact, MISRA C (rule 17.2 as of the 2025 edition) forbids it entirely due to potential unbounded stack usage.