#include <stdio.h>
int main() { //定义 int arr[3][4]={{1,2,3,4},{1,2,3,4},{1,2,3,4}}; int arr1[3][4]; arr1[0][0]=1; arr1[0][1]=2; arr1[0][2]=3; arr1[0][3]=4; arr1[1][0]=1; arr1[1][1]=2; arr1[1][2]=3; arr1[1][3]=4; arr1[2][0]=1; arr1[2][1]=2; arr1[2][2]=3; arr1[2][3]=4; printf("%d\n",arr1[2][2]); printf("%p\n",arr1[2]); for (int i=0; i<3; i++) { for (int j=0; j<4; j++) { printf("%d\t",arr1[j]); } printf("\n"); } }
|