title: Will memory be allocated for a typedef structure pointer?
body: <p>I have the following program, where i have a structure. I am going to assign some values to it and write it to a file.
  But the confusion here is, i have just declared a pointer to the structure and has not allocated memory. Then how does the variable assignment works?
  I am able to retrieve the values correctly from the file "/home/info"</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #define FILEE "/home/info"
  
  typedef struct my_info
  {
     int i;
     int j;
     int k;
     int l;
  }_my_info;
  
  void main()
  {
      _my_info *my_info;
      int fd;
      FILE *fp;
      my_info-&gt;i=100;
      my_info-&gt;j=300;
      my_info-&gt;k=200;
      my_info-&gt;l=400;
      fp = fopen(FILEE,"w");
      if (fp == NULL)
          printf("Error in opening file\n");
      fd=fwrite(my_info, sizeof(_my_info), 1, fp);
      if (fd&lt;0)
          printf("Error while writing\n");
      fclose(fp);
  }
  </code></pre>