Subj : Re: STRTOK Question To : borland.public.cpp.borlandcpp From : "Ed Mulroy [TeamB]" Date : Wed Sep 03 2003 01:33 pm The first line using strtok is being misused. NULL is only used as the string pointer calling argument in a call to strtok where a previous call has received a string address and this new call is expected to begin where the previous call left off. Try looking at the compiler's documentation on a function before using it. After that line the remainder of the program is invalid because an invalid address was given to strtok, a program which uses the address it is given to modify memory, so undefined behavior is all that can be expected of what remains. .. Ed > Steven wrote in message > news:3f560f9f$1@newsgroups.borland.com... > > 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, ","), .