title: How does the int and char pointer affect my print out here?
body: <p>so here is the code, till the 4th print out I easily followed it, but at the 5th print out, I don't understand    </p>
  
  <p>why its <code>"5: a[0] = 200, a[1] = 128144, a[2] = 256, a[3] = 302 "</code>?  </p>
  
  <p>I have commented the line in the code which I don't understand. I look forward to your response.</p>
  
  <pre><code>"#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  void
  f(void)
  {
      int a[4];
      int *b = malloc(16);
      int *c = 0;
      int i;
  
      printf("1: a = %p, b = %p, c = %p\n", a, b, c);
  
      c = a;
      for (i = 0; i &lt; 4; i++)
      a[i] = 100 + i;
  
      c[0] = 200;
      printf("2: a[0] = %d, a[1] = %d, a[2] = %d, a[3] = %d\n",
         a[0], a[1], a[2], a[3]);
  
      c[1] = 300;
      *(c + 2) = 301;
  
      3[c] = 302;
      printf("3: a[0] = %d, a[1] = %d, a[2] = %d, a[3] = %d\n",
         a[0], a[1], a[2], a[3]);
  
      c = c + 1;
      *c = 400;
  
      printf("4: a[0] = %d, a[1] = %d, a[2] = %d, a[3] = %d\n",
         a[0], a[1], a[2], a[3]);
  
      //I DONT UNDERSTAND WHAT THIS LINE BELOW DOES
      c = (int *) ((char *) c + 1);
  
      *c = 500;
      printf("5: a[0] = %d, a[1] = %d, a[2] = %d, a[3] = %d\n",
         a[0], a[1], a[2], a[3]);
  
      b = (int *) a + 1;
      c = (int *) ((char *) a + 1);
      printf("6: a = %p, b = %p, c = %p\n", a, b, c);
  }
  
  int
  main(int ac, char **av)
  {
      f();
      return 0;
  }
  
  
  
  output:
  1: a = 0x7fff65fdcb90, b = 0x1065007e0, c = 0x0
  2: a[0] = 200, a[1] = 101, a[2] = 102, a[3] = 103
  3: a[0] = 200, a[1] = 300, a[2] = 301, a[3] = 302
  4: a[0] = 200, a[1] = 400, a[2] = 301, a[3] = 302
  5: a[0] = 200, a[1] = 128144, a[2] = 256, a[3] = 302
  6: a = 0x7fff65fdcb90, b = 0x7fff65fdcb94, c = 0x7fff65fdcb91
  </code></pre>