#include <stdio.h> #include <stdlib.h> int main () { FILE *pFile = fopen ("myfile.txt","rb"); fseek (pFile, 0, SEEK_END); int filesize = ftell (pFile); fseek (pFile, 0, SEEK_SET); char *buffer =(char*) malloc (filesize); fread(buffer,1,filesize,pFile); buffer[filesize] = 0; printf ("%s",buffer); fclose (pFile); getchar(); return 0; }