怎样从二维数组中取一个数

如题所述

第1个回答  2009-12-02
int arr[3][3] = {{0, 1, 2}, {3, 4, 5}, {6, 7, 8}};

int num = arr[0][2];

num 的值就等于 2
第2个回答  2009-12-02
data_type test_ary[i][j]={……};
data_type target;
1、target=test_ary[x][y];(x<i&y<j)
2、data_type (*p_test_ary)[j];
p_test_ary=test_ary;
target=*(*(p_test_ary+x)+y);(x<i&y<j)本回答被提问者采纳
相似回答