පැහැදිලි නෑ![]()
![]()
this is from stackoverflow#include <stdio.h>
int main(int argc, char* argv[])
{
char const* const fileName = argv[1];
FILE* file = fopen(fileName, "r");
char line[256];
while (fgets(line, sizeof(line), file)) {
/* do stuff here, eg: printf("%s", line);
}
fclose(file);
return 0;
}
c karala na 1st year eken passe.this is from stackoverflow
Code:#include <stdio.h> int main(int argc, char* argv[]) { char const* const fileName = argv[1]; FILE* file = fopen(fileName, "r"); char line[256]; while (fgets(line, sizeof(line), file)) { /* do stuff here, eg: printf("%s", line); } fclose(file); return 0; }
http://stackoverflow.com/questions/9206091/going-through-a-text-file-line-by-line-in-c
ai google eke hoyanna ona ewa methana hoyanne