标签:二维 nbsp 二维数组 指针 bsp i++ ++ ptr 遍历
//int i[] = { 1,2,3 };
//int* ptr = i;
//for (int i = 0; i < 3;i++)
// printf("%d ", ptr[i]);
//int i[] = { 1,2,3 };
//int* ptr = i;
//for (int i = 0; i < 3;i++,ptr++)
// printf("%d ", *ptr);
//int array[2][3] = { {1,2,3},{4,5,6} };
//int (*pArray)[3] = array;
//for (int i = 0;i < 2;i++)
// for (int j = 0;j < 3;j++)
// printf("%d\n", pArray[i][j]);
/*int array[2][3] = { {1,2,3},{4,5,6} };
int *pArray = array;
for (int i = 0;i < 2;i++)
for (int j = 0;j < 3;j++)
printf("%d\n", *(pArray+i*3+j));*/
标签:二维 nbsp 二维数组 指针 bsp i++ ++ ptr 遍历
原文地址:https://www.cnblogs.com/sinianxinfei/p/11064213.html