读取文件发生错误,求解!!!!!!
读取存在问题,后面那一串不知道是哪来的,求助额...
#include<stdio.h>
#include<cstdlib>
#define SIZE 1
struct student
{
char sex[3];
int num;
char name[10];
long phone;
char a;
}stu[SIZE];
void main()
{
FILE *fp;
int i;
fp=fopen("file1.txt","rb");
printf("性别.学号.姓名.电话\n");
for(i=0;i<SIZE;i++)
{
fread(&stu[i],sizeof(struct student),1,fp);
printf("%s%d%s%ld ",stu[i].sex,stu[i].num,stu[i].name,stu[i].phone);
}
fclose(fp);
system ("pause");
}