```
#include <iostream>
using namespace std;

void palindrome(char *s){
    if (s[1] == 0)
    {
        return;
    }
    cout << s[0];
    palindrome(++s);
    cout << s[0];
}

int main(){
    char s[30]="foobar";
    palindrome(s);
    cout << endl;
}

```

I have to create a recursive function that turns any cstring into a palindrome. This is a homework question and the only code I can modify is inside the palindrome function. This code almost works. The problem is it returns "foobaraboo" and leaves off the last letter. Any tips to point me in the right direction? I've played around with the code for quite a while and can't seem to figure out how to change it so the last character of the palindrome shows up.