Home > Back-end >  A freshman simple questions about Pointers and arrays, for help
A freshman simple questions about Pointers and arrays, for help

Time:09-21

En * descrip what is [] is, can you explain it in detail

CodePudding user response:

This is a pointer array, which is an array element is a pointer, the first element array point to "Batteries" constant string, the second element to "Bulbs" constant string, the third element to "Fuese" constant string,

CodePudding user response:

This is a pointer array, pay attention to the modifier pointer, is being modified array, so this variable is an array, members (element) is a pointer, the length of the array (that is, the number of pointer) determined by the number of string constants of initialization, so there are several strings, length is a few,

Pointer to an array of the corresponding array pointer, who decorate, this note,

Array pointer;
 char arr [5] [5]. 
Char (* p) [5]=arr;//p is array pointer,

CodePudding user response:

reference 2 building self-confidence boy reply:
this is a pointer array, pay attention to the modifier pointer, is being modified array, so this variable is an array, members (element) is a pointer, the length of the array (that is, the number of pointer) determined by the number of string constants of initialization, so there are several strings, length is a few,

Pointer to an array of the corresponding array pointer, who decorate, this note,

Array pointer;
 char arr [5] [5]. 
Char (* p) [5]=arr;//p is array pointer,

thank you
  • Related