标签:存储 str1 ddd 定义 ret 二维 main include style
#include <stdio.h> int main(void) { //已知几个数组的定义及其初始化 char str1[] = "str1"; char str2[] = "str2"; char str3[] = "str3"; char *a[] = {str1,str2,str3}; char *b[] = {"aaa","bbbb","ccccc","dddddd"}; char *c[] = {"aaa","bbbb","ccccc","dddddd"}; char *d[] = {"aaa","bbbb","ccccc","dddddd"}; //1.定义一个指向数组a的指针 int** pa = a; //2.1定义一个一维数组arr1,存储abcd四个数组的地址作为成员 char** arr1[4] = {a,b,c,d}; //2.2定义一个指向数组arr1的指针 char*** p1 = arr1; //3.1定义一个2X2的二维数组arr2,存储ab cd 四个数组的地址作为成员。 char** arr2[2][2] ={a,b,c,d}; //3.3定义一个指向数组arr2的指针 char** (*p2)[2] = arr2; //已知几个数组的定义及其初始化 char *e[][2] = {"aaa","bbbb","ccccc","dddddd"}; char *f[][2] = {"aaa","bbbb","ccccc","dddddd"}; char *g[][2] = {"aaa","bbbb","ccccc","dddddd"}; char *h[][2] = {"aaa","bbbb","ccccc","dddddd"}; //1.定义一个指向数组e的指针 char*(*pe)[2] = e; //2.1定义一个一维数组arr3,存储abcd四个数组的地址作为成员。 char*(*arr3[4])[2] = {e,f,g,h}; //2.2定义一个指向数组arr3的指针 char*(**p3)[2] = arr3; //3.1定义一个2X2的二维数组arr4,存储ab cd 四个数组的地址作为成员。 char*(*arr4[2][2])[2] = {e,f,g,h}; return 0; }
标签:存储 str1 ddd 定义 ret 二维 main include style
原文地址:https://www.cnblogs.com/ZhuLuoJiGongYuan/p/9473884.html