Here is the sample code:
================================================== ========
Code:
/* strtok example */
#include <stdio.h>
#include <string.h>
int main ()
{
char str[] ="- This, a sample string.";
char * pch;
printf ("Splitting string \"%s\" into tokens:\n",str);
pch = strtok (str," ,.-");
while (pch != NULL)
{
printf ("%s\n",pch);
pch = strtok (NULL, " ,.-");
}
return 0;
}
================================================== =========
I have not understood the the following line in above piece of code:
" pch = strtok (str," ,.-");"
What's going on inside the parenthesis within the double quotes?