#include <string.h>
void StringReverse(char *str)
{
if(NULL == str)
{
return ;
}
char *pBegin = str;
char *pEnd = str + strlen(str) - 1;
while(pBegin < pEnd)
{
char tmp = *pBegin;
*pBegin = *pEnd;
*pEnd = tmp;
pBegin ++, pEnd --;
}
}
int main()
{
char str[] = "123456789";
StringReverse(str);
printf("%s\n",str);
}