title: Combined dereference and decrement in C
body: <p>I need as efficient a means as possible to shift the contents of an array.  I need to shift the contents of each array location one to the right and ignore the first one, so that I can write a new value there.</p>
  
  <p>Here's what I have:</p>
  
  <pre><code>#define LENGTH 5
  
  int myArray[LENGTH] = {1, 2, 3, 4, 5};
  
  int *pa = myArray + (LENGTH - 1);
  
  for (ushort i = 5; i &gt; 0; i--) {
      *pa = *(pa - 1);
      pa--;
  }
  </code></pre>
  
  <p>What I'd like to do is combine the two lines of the <code>for</code> loop into a single operation.  Something like:</p>
  
  <pre><code>*pa = *(pa--);
  </code></pre>
  
  <p>The result of this is undefined, however.  Am I stuck with what I'm already using?</p>
  
  <p>EDIT:  I should have clarified that this is not the actual code I'm using, just a quick example to demonstrate the construct that I was after.</p>