• Source
    1. #include <stdio.h>
    2.  
    3. int main ()
    4. {
    5. FILE * MyFile;
    6. char string[10];
    7. MyFile = fopen ("myfile.txt","r+");
    8.  
    9. while(! feof(MyFile))
    10. {
    11. fscanf(MyFile,"%s",string);
    12. printf("%s ", &string);
    13. }
    14. fclose (MyFile);
    15. return 0;
    16. }
    17.