K
Keith Thompson
Look at the arguments you're passing. Does "sizeof (size_t)" make any
sense in the context of your program? What made you think that
"sizeof (size_t)" is the right thing?
Why are you comparing the value returned by fwrite() against EOF?
What values does fwrite() return, and under what circumstances?
Did you *read the documentation for fwrite* before trying to call it?
You have an if statement. What do you do if the condition is true?
What do you do if the condition is false?
What do you do if there's an error? What do you do if there isn't an
error? Don't you think there should be a difference?
sense in the context of your program? What made you think that
"sizeof (size_t)" is the right thing?
Why are you comparing the value returned by fwrite() against EOF?
What values does fwrite() return, and under what circumstances?
Did you *read the documentation for fwrite* before trying to call it?
You have an if statement. What do you do if the condition is true?
What do you do if the condition is false?
An attempt at error checking.
What do you do if there's an error? What do you do if there isn't an
error? Don't you think there should be a difference?