title: Store a struct in a file using fwrite
body: <p>I would like to store a struct in a file. 
  I used this code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  typedef struct
  {
      int a;
      short b;
      char *ch;
  } wrFile;
  
  main()
  {
      FILE* fd=fopen("Result.txt","w+");
      wrFile wf={12451,14,"result"};
      fwrite(&amp;wf,sizeof(wrFile),1,fd);
      fclose(fd);
  }
  </code></pre>
  
  <p>the resul that I obtained in Result.txt is:</p>
  
  <pre><code>£0^@^@^N^@^@^@^Z^G@^@^@^@^@^@
  </code></pre>
  
  <p>The question is why?</p>