title: Program never executes '0' in my string array of char
body: <p>I am trying to make a simple program that can reverse a string</p>
  <pre><code>#include &quot;pch.h&quot;
  #define MAX 6
  
  int main()
  {
  
      puts(&quot;Hello and welcome. I will now reverse the word 'Hello' for you.&quot;);
      
      char const ord[MAX] = { &quot;Hello&quot; };
  
  
      for (size_t i = MAX; i &gt;= 0; --i)
      {
          printf_s(&quot;%c&quot;, ord[i]);
      }
  
      
  }
  </code></pre>
  <p><img src="https://i.stack.imgur.com/4cAKd.png" alt="" /></p>
  <p>However, I end up with only &quot;ello&quot; and some weird character like square shows up on my terminal. I tried and debug, and I think it is because the program never executes &quot;0&quot;, so I also tried to make  'i &gt;= 0&quot; in my for loop, but that just leads to a critical failures and the whole program stops. Any idea what to do from here?</p>