#include <stdio.h>
int main(void)
{
char text[100];
FILE *fp = fopen("readme.txt", "r");
if (!fp)
{
printf("Cannot open the file.\n");
return 1;
}
while (fgets(text, 100, fp) != NULL)
{
printf("%s", text);
}
fclose(fp);
return 0;
}
Posted inC Programming