title: How to print an entered string backwards in C using only a for loop
body: <p>I want to print a string backwards. But my code seems to count down the alphabet from the last letter in the array to the first letter in the array instead of counting down the array itself and spitting out each letter in the array.</p>
  
  <p>My code,</p>
  
  <pre><code>   #include &lt;stdio.h&gt;
     #include &lt;string.h&gt;
  
     int main(void) {
  
  char word[50];
  char end;
  char x;
  
  printf("Enter a word and I'll give it to you backwards: ");
  
  scanf("%s", word);
  
  end = strlen(word) - 1;
  
  for (x = word[end]; x &gt;= word[0]; x--) {
      printf("%c", x);
  }
  
  return 0;
  }
  </code></pre>
  
  <p>Any suggestions? Thank you.</p>