标签:blog io div on log c amp r as
#include <stdio.h> void func_1(const int* i){ func_2(i); } void func_2(int* i){ *i++; printf("i in func_2 %d\n", *i); } int main(){ int i=0; func_1(&i); printf("i in whole situation %d\n", i); return 0; }
输出结果: i in func_2 0
i in whole situation 0
变量自从在“上一级”层次中被“固定”以后,其值在下一层或本层中就不能被改变。
标签:blog io div on log c amp r as
原文地址:http://www.cnblogs.com/fengyubo/p/3984900.html