Needed help in pset4 recover.c .The code is compiling and executing but it is not producing any images.

enter image description here

  • Can anyone please help . The images are not produced because the condition does not satisfies once but why is this happening? Jul 14, 2016 at 21:21

1 Answer 1


The logic of your program has a "small bug", just you are writing in the output if you find a jpg, so you write 512 bytes for each jpg:

if (buffer[0] == 0xff && ...)


be sure to write outside the IF condition


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .