#include <stdio.h>
#include <process.h>
void main(){
FILE *fp;
char i,j;
char filename[30];
printf("please input the filename:\n");
scanf("%s",filename);
while((fp=fopen(filename,"r"))==NULL){
printf("can not open file:\npress any key to continue:\n");
getchar();
exit(0);
}
for(i=0;i<5;i++){
fscanf(fp,"%c",&j);
printf("%d is %5d\n",i+1,j);
}
fclose(fp);
}