why was a star used before the function name in:
char *mystrtok(…)
{
}
why was a star used before the function name in:
char *mystrtok(…)
{
}
Because it returns a token or rather say its address. Pointer variables are used to store addresses so char* mystrtok is used. Whenever a function returns a address, it should be of pointer type.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.