4 ms·
> In those 3 examples, the * is not a dereference operator, it simply indicates that it is a pointer This is one of the confusing parts for beginners, but in a
by bluetomcat 6y ago
> In those 3 examples, the * is not a dereference operator, it simply indicates that it is a pointer
This is one of the confusing parts for beginners, but in actuality, C declarations are meant to mirror the use of the variable. In that sense, you can think of the asterisk in the declaration as the same unary operator:
int *a; // dereferencing "a" gives you type "int"