/*
*编程练习题8
*函数名称:
*功能: 字符串倒序
*
*/
void str_reverse(char *str)
{
char *tp = str;
char temp;
for(;*str != '\0'; str++)
;
str--;
for(;tp < str; str--,tp++)
{
temp = *str;
*str = *tp;
*tp = temp;
}
}
*编程练习题8
*函数名称:
*功能: 字符串倒序
*
*/
void str_reverse(char *str)
{
char *tp = str;
char temp;
for(;*str != '\0'; str++)
;
str--;
for(;tp < str; str--,tp++)
{
temp = *str;
*str = *tp;
*tp = temp;
}
}

打好基础,学会站在巨人的肩膀上!