#include <stdio.h> int main () { int n; FILE *file; char buffer[27]; file = fopen ("my.txt", "w+"); for ( n='A' ; n<='Z' ; n++) fputc ( n, file); rewind ( file ); fread (buffer, 1, 26, file); fclose ( file ); buffer[26] = '\0'; puts ( buffer ); return 0; }