请高手帮忙看看这段代码对不对。。。
有一个文件,共1千万个二进制的数,大概40MB,我想读入,然后再屏幕上显示。程序可以执行但是已经四十分钟了,还在输出,请问哪里有问题么?#include <stdio.h>#include <malloc.h>#include <stdlib.h>void main(){ int i ; int filebytes; int *p; FILE *fo; fo = fopen("data_1千万.txt","rb"); filebytes = filelength(fileno(fo)); p = (int *)malloc(sizeof(int)*filebytes); int getc(FILE *fo); if(fo == NULL) { printf("该文件不存在"); } else { for(i = 0;i < filebytes; i++) p[i] = getc(fo); } for(i = 0;i < filebytes; i++) { printf( "%d ",p[i]); if(i % 25 == 0) printf(" \n "); } fclose(fo); free(p);}