jeffshia
全部博文(199)
2007年(23)
2006年(176)
IT小怪兽
wanenjie
adonisLe
icelee52
h567125
ARMUNIX
snowdrif
苏宇佳
hbusan
分类: C/C++
2006-12-11 14:50:29
/*
* Test this code and think why it acts as that?
*/
#include<stdio.h>void foo(int b[][3]);int main(void){ int a[3][3]= { {1,2,3}, {4,5,6}, {7,8,9} }; printf("a[2][1] before foo is:%d\n", a[2][1]); foo(a); printf("a[2][1] after foo is:%d\n", a[2][1]); return 0;}void foo( int b[][3]) { ++b; b[1][1]=9; }
上一篇:code helping you to understand function stack
下一篇:听一首伤感的情歌
登录 注册