How to write a C Program To Read file Line by Line ?
Solution:
#include<stdio.h>
int main(void){
FILE *file;
file=fopen("test.log","r");
char line[128];
while(fgets(line,sizeof(line),file))
fputs(line,stdout);
fclose(file);
}
Learn To Write A Program. Learn Programming Online. Find Programming Solutions.