And a pointer to a pointer to an array of different variables

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/weixin_37597675/article/details/95512761

Pointer to an array of pointers with the general sense is not the same, especially when printed, pointing to an array of pointers can be used to print the contents of p [i] to print, but a pointer to a variable print must dereference.

Before always I wanted to do not understand why this is? In fact, to think clearly under an array of table usage will know.
Array char [. 5] = {1,2,3,4,5};
char * P = Array;
the printf ( "% D IS Data \ n-", P [. 1]);
P [. 1] with the array access method the following table access method is the same, you do not need to print the dereference when there exist the following table, the key part is that [] array access method under the table.

Guess you like

Origin blog.csdn.net/weixin_37597675/article/details/95512761