Is there any hard-wired limit on recursion depth in C

前端 未结 4 1513
野的像风
野的像风 2021-02-13 09:54

The program under discussion attempts to compute sum-of-first-n-natural-numbers using recursion. I know this can be done using a simple formula n

4条回答
  •  庸人自扰
    2021-02-13 10:29

    The C standard does not define the minimum supported depth for function calls. If it did, which is quite hard to guarantee anyway, it would have it mentioned somewhere in section 5.2.4 Environmental limits.

提交回复
热议问题