Compare this:
typedef int * pointer_to_int;
Here, the asterisk is part of the type being given a new name, i.e. pointer_to_int
is an alias for the type int *
.
With your example, it's exactly the same! The asterisk is part of the type, so that node
becomes an alias for the type pointer to struct node { int *u; struct node *next; }
.
Also, note that it's often a bad idea to include the asterisk in typedef
, since it makes the code much harder to use. In C, it's often very interesting to know whether a variable is a pointer or not, so hiding that fact isn't very helpful.