1 //numeric pointers and array of pointers2 //C language Environment3 4#include"stdafx.h"5 6 intMainintargcChar*argv[])7 {8 //An array pointer, which is a pointer. This pointer points to an array.9 //An array of pointers, which is an array. The elements stored in this array are pointers.Ten //What do you think? One //To see who has the highest priority, the priority is the focus. A - CharP[] ={'A','B','C','D'} ; - //This is an array of characters called p, and this array has 4 char-shaped elements. the - Char* pchar[] = {"First Grade","2 grade","3 Grade","4 Grade"} ; - //because [] the priority is higher than *, the focus is [], that is, the array. - //so this is an array, the name of the array called Pchar. + //The array contains 4 elements, these 4 elements are pointers (char*), according to the contents of the pointer as the address of the found is a char type. - //The description is a string, and the string is interpreted as an address. + //because in the Assembly statement, the character is put into some memory, and then use the memory address to assign to other variables. A at CharB[] = {'A','B','C'}; - //This is a character array named B, which has 3 char-shaped elements. - - Char(*cha) [3] = {&p}; - //because () the priority is higher than [], the () inside of a *, the focus is () inside the *, that is, the pointer. - //so this is a pointer, the type of pointer is char (*) [3], and this pointer is named CHA in //this pointer content is the first address of an array, which must have 3 char elements. - to return 0; +}
Array pointers and array of pointers