title: what happens in when we use pragma pack(1)?
body: <pre><code>#include &lt;stdio.h&gt;
  #pragma pack(1)
  
  typedef struct 
  {
    char name[10];
    int age;
    int class;
    char grade;
  }stud_s;
  
  int main(void)
  {
    stud_s s1= {"john" ,10, 10, 'A'};
    printf("%ld \n",sizeof(stud_s));
    return 0;
  }
  </code></pre>
  
  <p>In the above structure the name is reserved 10 bytes. And the name "john" is 4 bytes so when I use <code>#pragma</code> the size of structure should be 13. Instead the size resulted in 19 bytes. Could anyone have a look at my code? Any help would be appreciated.</p>