My string is \"A,B,C,D,E\" And the separator is \",\" How can I get the remaining string after doing strtok() once, that is \"B,C,D,E\"
char a[] = \"A,B,
You can vary the set of delimiters, so simply pass an empty string:
char a[] = "A,B,C,D,E"; char * separator = ","; char * b = strtok(a, separator); printf("b: %s\n", b); char * c = strtok(NULL, ""); printf("c: %s\n", c);