Hello all. Im having and issue when reading from a .txt file. Some of the lines in it are being skipped by the while loop and I have no idea why. Any insight is greatly appreciated.
Code:#include <stdio.h> #include <string.h> int main(int argc, char *argv) { char str[80]; FILE *fIn; fIn = fopen("./input.txt", "r"); int i; while (fgets(str, 1024, fIn) != NULL) { fgets(str, 1024, fIn); printf("%s",str); } fclose(fIn); }