Brother, what’s wrong with you haha It’s been so long since I’ve touched such a basic thing I recommend you a book on 495 C language problems you must know Let’s talk about your problem int p in (*p)[3] is a pointer to an array. This array has 3 elements of type int , so p and n can wait
int(*p)[3] is a pointer to an array. The one-dimensional space of this array is uncertain, and the two-dimensional space has three elements. All elements are of type int, so n is used for assignment. For p. In C language, *p is equivalent to an array of uncertain length. So int(*p)[3] is equivalent to int p[][3]
Brother, what’s wrong with you haha
It’s been so long since I’ve touched such a basic thing
I recommend you a book on 495 C language problems you must know
Let’s talk about your problem
int p in (*p)[3] is a pointer to an array. This array has 3 elements of type int
, so p and n can wait
The type of p should be int[3]~
The p in
int(*p)[3] is a pointer to an array. The one-dimensional space of this array is uncertain, and the two-dimensional space has three elements. All elements are of type int, so n is used for assignment. For p.
In C language, *p is equivalent to an array of uncertain length.
So int(*p)[3] is equivalent to int p[][3]
p seems to be the first address of an int array of unlimited length, and the first 6 are 10 to 60, while the following are random garbled characters.
Pfft, did you learn from Tan Xqiang?
OnlyC++ main function declaration has never been written in this way:
int (*p)[3]
p is apointer to
array of 3 elements of
int