/*
* 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; }
|