|
I use fwrite to write int-type data, and all that is written to the file are: ) I do not know how it is?
code show as below:
FILE * file;
char list [3000];
int i, numread, numwritten;
/ * Open file in text mode: * /
if ((file = fopen ("fread.txt", "w + b"))! = NULL)
{
for (i = 0; i <3000; i ++)
list [i] = (char) 3456;
/ * Write 25 characters to stream * /
numwritten = fwrite (list, sizeof (char), 3000, file);
printf ("Wrote% d items\n", numwritten);
fclose (file);
}
Help, wait online, urgent! ~ |
|