title: I want to know why this program below is not working i want to print the reverse of each string?
body: <pre><code>#include&lt;stdio.h&gt;
  int main()
  {
      char str[5][10];
      int i,j,k;
      printf(&quot;Enter 5 strings:&quot;);
      for(i=0;i&lt;=4;i++)
      {
          scanf(&quot;%s&quot;,str[i]);
      }
      for(i=0;i&lt;=4;i++)
      {
          for(j=0;str[i][j]!='\0';j++);
          for(k=j-1;k&gt;=0;k--)
          {
              printf(&quot;%s&quot;,str[i][k]);
          }
      }
      return 0;
  }
  </code></pre>
  <p>please also explain my mistake and how to make such program without strrev() function i know it might be a dumb question but i am asking this because i am new to programming please help.</p>