摘要:
C 语言中函数的参数是传值的,即传递一个拷贝进入函数中.例如 1 #include <stdio.h> 2 int Calculator(int m); 3 4 main() 5 { 6 int n; 7 n=0; 8 Calculator(n); 9 printf("%d",n); 10 11 }12 13 int Calculator(int m)14 {15 m=100;16 }最后输出的结果是 0而如果需要按引用传递的话需要用到指针或者是数组. 阅读全文
posted @ 2012-09-19 10:38
wccc
阅读(149)
评论(0)
推荐(0)

浙公网安备 33010602011771号