Potresti usare la strtok() :

char *strtok(char *s1, const char *s2)