1
vote
Accepted
In recover, image files are not writing bytes correctly. Why?
I have two questions.
First, in the else clause code block, why does the code reopen an already open file?? What is the first thing that fopen() does when a file is opened in "w" mode?
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
recover × 913pset4 × 701
pset4recover × 86
segmentation-fault × 77
cs50x × 70
check50 × 60
c × 51
pset5 × 46
pset3 × 40
fread × 27
jpeg × 25
pointers × 11
fopen × 11
fwrite × 10
file-pointer × 10
error × 9
valgrind × 9
buffer × 9
pset × 8
malloc × 8
file-io × 8
invalid-image-format × 8
segfault × 7
fails-check50-but-works × 6
images × 6