#include <stdio.h> #include <string.h> int main () { char str[] ="test string."; char * test; test = strtok (str," "); while (test != NULL) { printf ("%s ",test); test= strtok (NULL, " "); } return 0; }