fwrite函数的问题
#include<stdio.h>struct mystruct
{
int i;
char ch;
};
int main(void)
{
struct mystruct s;
FILE *fp;
char pathname[30];
puts("please enter the pathname:");
scanf("%s",pathname);
fp=fopen(pathname,"wb");
s.i=0;
s.ch='A';
fwrite(&s,sizeof(s),1,fp);
fclose(fp);
return 0;
}
为什么数字无法显示,显示结果是A烫!求解,是不那里出错了呢?