2f6 Subj : STRTOK Question To : borland.public.cpp.borlandcpp From : Steven Date : Wed Sep 03 2003 01:00 pm I was messing around with strtok and found something interesting: #include #include int main(void) { char input[16] = "a,b,c,d"; printf("%s %s %s %s\n", strtok(NULL , ","), strtok(NULL, ","), strtok(NULL, ","), strtok(input, ",")); printf("%s %s %s %s\n", strtok(input, ","), strtok(NULL, ","), strtok(NULL, ","), strtok(NULL , ",")); return 0; } /* output: d c b a a (null) (null) (null) */ Is the first line of output a result of strtok, printf, or is strtok being misused? Why does the second line of output produce 3 (null) values? Thanks, Steve . 0