READFILE


#include <stdio.h>

#define antal 5000

main(int argc,char *argv[1])
{

FILE *stream;
char list[antal];
char *filename;
int  numread,ccounter;
filename=argv[1];
ccounter=1;   

	if( (stream = fopen( filename, "r" )) != NULL )
    {
     numread = fread( list, sizeof(char),antal, stream );

        while (ccounter<numread) 
     	{
     	printf( "%.1c", list[ccounter] );
     	ccounter=ccounter+1;
     	}
     }
  else
     printf( "Was not able to open the file\n" );
fclose( stream );
getch();
return(0);
}