After pointer pa
declaring, right now,to use it in the function malloc()
,
why compiler can know its size? And compiler how to parse under code:
int *pa = malloc(10 * sizeof *pa); // allocate an array of 10 int
and
struct Node {
int value;
struct Node *prev;
struct Node *next;
}
prev
and next
is struct Node *
, but now struct Node
is undefined.
Why compiler is able to allocate enough size for *prev
, *next
?