#include int main() { FILE *fp; if ((fp = fopen("data", "r")) == NULL) { perror("data"); } else { int c; while ((c = getc(fp)) != EOF) putchar(c); fclose(fp); } return 0; }