Open a file
then get a line in buffer using getline()------------------> see " man getline " for details.
then use strchar() to locate a space character --------------> see " man strchar()"
This will give you the index of first space charecter in that buffer.
strncpy ( first_word , buffer , index_of_space);
printf (first_word)
And then read the next line until the end of file. The code will be something like.