Please, anyone who's an expert.

Spoilerlectures

I'm taking the CS50x online course, and recently i have taken the week 4 lecture. I must mention that i found this particular lesson (memory) noticeably harder than previous lessons.

My question is about problem set 4, to be more specific the volume problem. While I did the problem the correct way, the thing i don't get is:

!For the sake of context, we first copy the header file of the input to the output wav file and then we copy and paste the sound data. Why do we copy them separately, your answer might be that the header data is exactly 44 bytes and the sound data is 2 bytes per sample, and yes i do understand that and separating them would allow us to change the sound sample without altering the header file. However, how does the computer know that( when copying the sound data ) we have already copied the header file, I mean does it skip the header file information and move on to the sound data directly, in the end we are just copying 2 bytes of the input and pasting them in output.!<

!Thank you. !<

Posted Aug 10, 2026, 4:14 PM UTC

13
Loading comments…