title: Reverse String without strrev function
body: <p>How can I reverse a string in C by just giving a char* and the length as input parameters and recieving the reversed string as output?
  Also, without using the strrev function.
  Just by usign loops?</p>
  
  <p>EDIT: Okay thats how I did it now:</p>
  
  <pre><code>char*  __stdcall Reverse(char *str, int length, char* *out)
  {
  
   char *s = str;
  
      char *end = s + length - 1;
      for (; s &lt; end; ++s, --end) {
          char ch = *end;
          *end = *s;
          *s = ch;
      }
        *out = str;
  }
  </code></pre>