Hey, I'm new to this so hi
I've a .txt file with 96 numbers in it
I need a while loop to read how many numbers there are in the .txt file because the file changes and the number of numbers changes.
EOF was used but I'm not really clear on that.
Heres my sexeh code
int i, c;
fp = fopen("elec_load_data.txt", "r");
while ((c = fgetc(fp)) != EOF)
printf("%d\n", i); // to see if the counter is counting