title: Reading and writing a buffer in binary file
body: <p>Here is my code as of now:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include "readwrite.h"
  
  int main ()
  {   FILE* pFile;
      char buffer[] = {'x' ,'y','z',0};
      pFile = fopen("C:\\Test\\myfile.bin","wb");
  
      if (pFile ){
          fwrite(buffer,1,sizeof(buffer),pFile); 
  
      printf("The buffer looks like: %s",buffer);
    }
      else
      printf("Can't open file");
  
  
     fclose(pFile);
     getchar();
     return 0;
  }
  </code></pre>
  
  <p>I'm trying to write something verify i wrote to the file and then read from the file and verify i read from the file. How best is there to do this? I also need to figure out a way to write the same thing to 2 different files. Is this even possible?</p>