摘要: 下面是个关于递归调用简单但是很能说明问题的例子:[cpp]view plaincopy/*递归例子*/#include<stdio.h>voidup_and_down(int);intmain(void){up_and_down(1);return0;}voidup_and_down(intn){printf("Level%d:nlocation%p/n",n,&n);/*1*/if(n<4)up_and_down(n+1);printf("Level%d:nlocation%p/n",n,&n);/*2*/}输出结果L 阅读全文
posted @ 2013-05-20 20:34 拦云 阅读(578) 评论(0) 推荐(0) 编辑