title: Char pointer to integer array
body: <pre><code>int main()
  {
      int x[] = {1, 2, 3};
      char *p = &amp;x;
      printf("%d", *(p+1));
      return 0;
  }
  </code></pre>
  
  <p>I run the code in codeblocks and it is giving 0 as output.
  If I I change p as int pointer then its giving 2 as output.</p>
  
  <pre><code>int main() 
  {    
  int x[] = {1, 2, 3}; 
      int *p = &amp;x; 
      printf("%d", *(p+1));
      return 0;
  }
  </code></pre>
  
  <p>Why so?</p>