Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - C plastic pointer can be assigned?
C plastic pointer can be assigned?
The core lies in the type of p.

Define equivalent to

int * p[3];

Here p is an array containing three elements, each of which is of type int *

therefore

P is an array name and cannot be assigned.

B p[0] is int*, a is the name of two-dimensional array, which is equivalent to int **, and the types do not match.

C a[ 1][2] is an element of A, and its type is int, so&; A[ 1][2] is int* and is the same type as p[0], so this assignment is legal.

D has nothing to say, the error is even more outrageous than B, int***, assigned to int*, and the type does not match.