So I want to count the lines of the file I have as the argument of the function, but I don't know why does this loop run indefinitely.
int count_numbers(FILE *filea) {
int i;
while (!feof(filea)) {
i++;
}
fclose(filea);
i--;
return i;
}