Mercurial > hg > CbC > old > device
view test/multi.c @ 640:04211a2cf227
*** empty log message ***
author | kono |
---|---|
date | Wed, 01 Nov 2006 01:27:11 +0900 |
parents | f3af9f3332f5 |
children | e9622935a621 |
line wrap: on
line source
int printf(const char *,...); #define LEN0 10 #define LEN1 10 typedef int ARRAY[LEN0][LEN1]; int a[LEN0][LEN1]; int f(ARRAY a) { int i,j; int b[LEN0][LEN1]; j = a[1][1]; j = b[1][1]; for(i=0;i<LEN0;i++) for(j=0;j<LEN1;j++) printf("f %d %d = %d\n",i,j,a[i][j]); for(i=0;i<LEN0;i++) for(j=0;j<LEN1;j++) b[i][j] = i*100 + j; for(i=0;i<LEN0;i++) for(j=0;j<LEN1;j++) printf("fl %d %d = %d\n",i,j,b[i][j]); } int main() { int b[LEN0][LEN1]; int i,j; j = a[1][1]; for(i=0;i<LEN0;i++) for(j=0;j<LEN1;j++) a[i][j] = i*100 + j; for(i=0;i<LEN0;i++) for(j=0;j<LEN1;j++) printf("m %d %d = %d\n",i,j,a[i][j]); for(i=0;i<LEN0;i++) for(j=0;j<LEN1;j++) b[i][j] = i*100 + j; for(i=0;i<LEN0;i++) for(j=0;j<LEN1;j++) printf("l %d %d = %d\n",i,j,b[i][j]); f(a); }