Well, since your question is "why it doesn't work", might as well answer exactly that.
I'm going to assume that the re() declaration is just a typo for rec() -- of course you have to correct that.
In the first line of that function, you declare a variable, int i = 0;. However, that variable is never assigned to again. Scan the function for any assignment on i -- you won't find any. Therefore, that i variable is a constant 0. With that in mind, let's replace i by 0 and write the code again:
if (pin[0]=='\0')
return;
else
{
rec(pin[1]);
printf("%c", pin[0]);
}
The offending line is clearly rec(pin[1]). The function expects a char * argument, i.e., a string (note that char * and char [] are the same in function parameter declarations). However, pin[1] is just the second character of pin. What you're doing there is converting implicitly that character to a pointer and passing it to the function -- which is incorrect.
What you want to pass to rec() is the pointer to the second character, since that would make it a pointer to a string beginning at the second character of pin. So, the correct call would be rec(pin + 1), not rec(pin[1]). Since pin points to the first character of the string, pin + 1 points to the second.