#include<stdio.h>
void test2();
int main() {
char cs[2][3] = {"123","456"};
int i= *(cs[0]+1);
char (*p)[3] = cs[0];//3指的是一维数组的长度
int m = *(*cs + 1);
printf("%c\n",i);//2
printf("%c\n", m);//2
printf("%c\n", (*p)[0]);//1
printf("%c\n", *(*p+2));//3
printf("%c\n", *(p[0]));//1
printf("%c\n", **(p + 1));//4
printf("%c\n", *(*(p+1)+1));//5
printf("%p\n", cs[1]);//指针地址
//指针数组是专门针对二维数组的指针,二维数组存储的是指向该数组的指针的地址,
//是一个二级指针.
system("pause");
return 0;
}
void test2() {
int a[2][3] = {{1, 2, 3},
{4, 5, 6}};
int (*b)[3] = a;
int (*c)[3] = a + 1;
int *e = a[0];
printf("%d\n", *e);
printf("%d\n", *(*a));
}
[参考链接]https://blog.csdn.net/q302989778/article/details/80216899
[参考链接]http://www.cnblogs.com/mq0036/p/3382732.html