//Opens file "hello.txt" and read and print out one byte #include int main(void){ FILE *in = fopen("hello.txt", "r"); if (in == NULL) { perror("hello.txt"); return 1; } int c = fgetc(in); if ( c == EOF ){ printf("There is nothing to read\n"); } else { printf("I just read: "); fputc(c,stdout); //Could just use putchar(ch); printf("\n"); } fclose(in); return 0; }