title: Creating a dynamic array with only location of memory in a file
body: <p>I have some file *fp which has structs laid out in an array at an offset of 4 bytes after the file's header "header."</p>
  
  <p>How would I use typecasting to read individual structs out of this array using only the location in memory?</p>
  
  <p>Would it be something like this?</p>
  
  <pre><code>struct_name *arr = (struct_name *) &amp;header + 4; 
  
  struct_name x = arr[1];
  </code></pre>
  
  <p>I am doing something similar but getting a segmentation fault. Does anything need to be malloc-ed here?</p>