Is this the best way to reverse a string in C (not in place)? Here is my code. Is there anyway to make it more efficient?

/*
IN: string to have characters reversed
OUT: string containing characters in reversed order
*/
char* reverStr(const char *str)
{
        char* revStr = (char*)malloc(strlen(str));
        int i;
        for(i = strlen(str)-1; i &gt;= 0; i--)
            revStr[strlen(str)-1-i] = str[i];
        return revStr;
}
What about this:

/*
IN: string to have characters reversed
OUT: string containing characters in reversed order
*/
char* reverStr(const char *str)
{
        int index=strlen(str);
        char* revStr = (char*)malloc(index--);
        int destIndex=0;
        while (0&lt;=index)
            revStr[destIndex++] = str[index--];
        revStr[destIndex]=0; 
        return revStr;
}