title: Decrementing an array and print a value if condition met
body: <p>I want to decrement a pointer to the last element of an array and check for the condition that if the value of the pointer was smaller than 5, do nothing and go to the next round of loop and if not, that is if the value is equal or bigger than 5, print the value. So, for the array in the example, I want only 6 to be printed, that is the first encounter of a value equal or bigger than 5. I tried the code below but while being compiled with no error, it doesn't print any value. I'd appreciate your comments on this.</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  
  //The is a C program to decrement an array from the last element to the first. 
      int x[11] = {5, 6, -4, -3, -2, -1, 4, 3, 2, 1, -2}; 
      int *lastElem, count;
  int main (void) {
      lastElem = &amp;x[10];
      for (count = 0; count &lt; 11; count++)
          if (abs(*lastElem) &lt; 5)
          continue;
          else 
          printf("%d\n", *lastElem--); 
      return 0;
  }
  </code></pre>