提问:怎么给数组中的某个(比如[1][2])赋值?
提问:怎么给数组中的某个(比如[1][2])赋值?

#include<stdio.h> int main(void) { int a[2][2],b[2][2]; int i,j,k=0; for(i=0;i<2;++i) /*头一种赋值方法*/ for(j=0;j<2;++j,++k) a[i][j]=k; b[0][0]=1; b[0][1]=2; b[1][0]=3; b[1][1]=4;/* 第二种赋值方法*/ system("pause"); return 0; }