char str1[] = "hello,world";
char str2[13] = { 'h','e','l','l','o','w','o','r','l','d' };
const char* str3 = "hello,world";
https://blog.csdn.net/qq_28114615/article/details/86434837
1.通过指针访问数组
1.1通过指针访问一维数组
int a[4]={1,2,3,4};
int *p=a;
1.2通过指针访问二维数组
1.2.1 指向元素的指针
int a[3][4]={{1,2,3,4},{5,6,7,8},{9,10,11,12}};
int *p=&a[0][0];
网友评论