Hello,
I've been trying to build a program with fwrite( ), that just writes an array of 10 integers at a file called Project.doc. Here is the code:
The .doc file is created, however there are no numbers in it. Instead there are some weird symbols. Can anyone help?
Thanx,
Alex
I've been trying to build a program with fwrite( ), that just writes an array of 10 integers at a file called Project.doc. Here is the code:
Code:
int main(int argc, char *argv[])
{
FILE *fs;
int irc;
fs=fopen("Project.doc","w");
int a[10]={1,2,3,4,5,6,7,8,9,10};
irc=fwrite(a,sizeof(int),10,fs);
printf(" fwrite return code = %d\n", irc);
fclose(fs);
system("PAUSE");
return 0;
}
Thanx,
Alex
Comment