I'm experiencing a problem in the resolution of an exercise. I need to read N strings from file, but I can only read the first. How can I fix it?
#include <stdio.h>    
int main() {
 /* variable declarations */
   FILE *fp;
   char vet[100];
   fp = fopen("file.txt","r");  /* open file with N strings */
   while(!feof(fp)) {
     fgets(vet, 100, fp);
     vet[100]='\0';
     printf("%s\n", vet);  
   }
}
 
     
    