- 下面黄颜色的标注是个人认为的一些对递归理解非常经典的一些话
- 代码实例
#include <stdio.h> void binary_to_ascii(unsigned int value) { unsigned int quotient; quotient = value / 10; if (quotient != 0) { binary_to_ascii(quotient); } putchar(value % 10 + '0'); } int main(void) { binary_to_ascii(4267); putchar('\n'); return 0; }
- 下面以上面的代码实例来理解整个递归过程的调用