/// M311 - demonstration : gets, strtok #include #include #include #include int main() { char *mot; char *ligne = malloc (80); ligne = fgets (ligne, 80, stdin); printf("===%s===\n", ligne); mot = strtok (ligne, " "); while (mot != NULL) { printf("%s\n", mot); mot = strtok (NULL, " "); } return 0; }