M
M. =?ISO-8859-1?Q?=C5hman?=
I'm reading "C: A Reference Manual" but still can't understand a
very basic thing: is there any functional difference between
fgetc/fputc and fread/fwrite (when reading/writing one unsigned
char)?
1. Books and documentation on C tell me fread and fwrite is "binary".
What does binary mean in this? Anything to do with opening a file
in binary mode?
2. I'm also sure I've read somewhere on the net that fread and
fwrite are unbuffered. True or false?
3. I found this when googling:
[ Lawrence Kirby @ comp.lang.c, Sat 5 Feb 2000 ]
....
"In C a stream is a sequence of characters. All read operations are
defined to read data from the stream as if by one or more calls to
fgetc() and all write operations by one or more calls to fputc()."
....
If that's true, I think it would answer the first 2 questions.
Magnus
very basic thing: is there any functional difference between
fgetc/fputc and fread/fwrite (when reading/writing one unsigned
char)?
1. Books and documentation on C tell me fread and fwrite is "binary".
What does binary mean in this? Anything to do with opening a file
in binary mode?
2. I'm also sure I've read somewhere on the net that fread and
fwrite are unbuffered. True or false?
3. I found this when googling:
[ Lawrence Kirby @ comp.lang.c, Sat 5 Feb 2000 ]
....
"In C a stream is a sequence of characters. All read operations are
defined to read data from the stream as if by one or more calls to
fgetc() and all write operations by one or more calls to fputc()."
....
If that's true, I think it would answer the first 2 questions.
Magnus