title: Difference between arrays and pointer when expression such as anArray++ is used in C
body: <p>I'm currently studying C using the book "C Primer Plus 6th edition. </p>
  
  <p>In the chapter on arrays and pointers, the author states</p>
  
  <blockquote>
    <p>As far as C goes, the two expressions ar[i] and *(ar+i) are equivalent
    in meaning. Both work if ar is the name of an array, and both work if
    ar is a pointer variable. However, using an expression such as ar++
    only works if ar is a pointer variable.</p>
  </blockquote>
  
  <p>I thought in c, <code>ar[0]</code> and <code>*(ar + 0)</code> is equivalent and they both equal to the value contained in index 0 of the array. But why expression such as <code>ar++</code> only works if <code>ar</code> is a pointer variable? I'm really stuck on the logic behind it.</p>