Skip to main content
3 votes

lab4 volume - Not being able to understand the given solution

3rd question: fread takes as arguments the buffer or variable (array) you want to read into, it has that "&" because arrays are kind of pointers, then it takes how many bytes to read, ...
Chakib37's user avatar
  • 101
1 vote
Accepted

Lab 4 using feof() function

The problem results from the nuance of the feof() function. The end of file flag isn't set until an attempt is made to read past the last byte of the file. In this case, the prior fread() call will ...
Cliff B's user avatar
  • 69k
1 vote
Accepted

unit16_t error while including library

Spelling error in the code. it should be uint8_t not unit8_t
DinoCoderSaurus's user avatar
1 vote

Why do you not need to allocate memory for int16_t in Lab4, volume?

You are declaring int16_t buffer;. That allocates space on the stack for one 16 bit integer.
curiouskiwi's user avatar
  • 18.7k
1 vote

Possible error in solution video of pset4 lab 'volume' within fread() function of header

This is not a mistake I thought the same that you thought but then I understood all that we are doing is to take the entire chunk of 44 bytes and copying it at ONCE and this is important AT ONCE to ...
Scene's user avatar
  • 40
1 vote
Accepted

Possible error in solution video of pset4 lab 'volume' within fread() function of header

This is not a mistake in the lecture. header contains enough space to hold HEADER_SIZE bytes. You are probably thinking that it is being declared as an array of unit8_t, which it is, but it will be an ...
Robert S. Pratt's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible