title: multiple '++' working in variables, and pointers
body: <p>This is what I think the <code>++</code> operator does</p>
  
  <ol>
  <li><code>a++; // a+=1 after calculating this line</code></li>
  <li><code>++a; // a+=1 before calcuating this line</code></li>
  </ol>
  
  <p>I'm trying to study pointers, and I think that I misunderstood something.</p>
  
  <pre><code>int a=10;
  int arr[3]={0,1,2};
  int *ptr;
  ptr=arr;
  
  printf("%d,%d,%d,%d\n",a++,a++,++a,++a);
  printf("%d,%d,%d\n", ptr[0],ptr[1],ptr[2]);
  printf("%d,%d,%d,%d,%d,%d", * ptr++, ( * ptr)++, ++ * ptr, ++( * ptr), *++ptr, * ptr);
  </code></pre>
  
  <p>I expected that the output to be:</p>
  
  <pre><code>12, 12, 12, 12
  0,1,2
  3,3,3,3,3,3,3
  </code></pre>
  
  <p>But it wasn't. It was this:</p>
  
  <pre><code>13,12,14,14
  0,1,2
  4,3,2,2,2,2
  </code></pre>
  
  <p>Why is this?</p>