I wrote a c program which read from a input file and then print each line to the standard output but it don't print the last line of the file!
int main() {
FILE *rf = fopen("input_text.txt", "r");
char c;
if (rf) {
while ((c = getc(rf)) != EOF) {
putchar(c);
}
fclose(rf);
}
return 0;
}
How can i fix this issue? Thanks in Advance!