This may sound very silly and stupid.I am tyring to understand the difference between
char *token[32];
and
char token[32];
char token[32] declares token to be character array that can contain 32 characters.
In case of char *token[32],token holds 32 character pointers.What does these pointers point to? Or more specifically it is the responsibility of the user to allocate memory for what the pointers point to.?
is an array of 32 char pointers. i.e. The array can be used as:
where p1 and p2 can be of
char[]orchar*type.This post may help you understand some more related things other than what asked:
C pointer to array/array of pointers disambiguation