title: How to read / write files to directories in C?
body: <p>I need to write a binary file to some specified directory using a C program. But, while writing I want to make sure that if the directory structure does not exist it should create one for me. </p>
  
  <p>How can I achieve this?</p>