title: Initialize the structure by another structure, is this possible?
body: <p>I would like to know, is that possible to initialize the structure1 by structure2.
  I am new to the concept of casting too.
  The output of this code has to be zero. Please guide. Thanks!</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  
  typedef struct student
  {
   int roll_id[10];
   int name_id[10];
   int postn;
  } student;
  
  typedef struct exams
  {
  int subject[10];
  int area;
  }exams;
  
  int main()
  {
   exams e= { {0} };
   student *pptr= (student*)&amp;e;
   printf (" %d\n", pptr-&gt;name_id[9]);
   return 0;
   }
  </code></pre>