Reversing a string in place without using iteration in C This is function for reversing a string in C using recursive calls:

#include &lt;stdio.h&gt;
#include &lt;string.h&gt;

void revert(char* left, char* right) { // Should I pass char* like I'm doing now or are char** a better idea?
    if(left == right) return;

    char *ll = left; char* rr = right;

    char tmp = right[0];
    right[0] = left[0];
    left[0] = tmp;
    revert(++ll,--rr);
}

int main() {
    char rev_string[] = "Some teststring";
    printf("%s\n", rev_string);
    revert(&amp;rev_string[0],&amp;rev_string[strlen(rev_string)-1]);//rev_string[strlen(rev_string)-1]);
    printf("%s\n", rev_string); 
    return 0;
}


Can it be simplified? Can anything be written better?
There is a bug. Some teststring contains an odd number of characters, therefore a left == right condition is eventually hit. For an even-length string, it would never be satisfied. You should test for left &lt; right instead.
There is absolutely no need to reassign left, right to ll, rr. revert(++left, --right) works as good.

To clear the possible confusion (see comments) this is what I meant:

if (left &lt; right) {
    swap_values(left, right);
    revert(++left, --right);
}