http://acm.hit.edu.cn/hoj/problem/view?id=2066
字符串反序
#include <stdio.h>
#include <string.h>
int main()
{
int t, i, len;
char str[128];
char temp;
scanf("%d", &t);
getchar();
while (t--)
{
gets(str);
len = strlen(str);
for(i = 0; i <= (len-1) / 2; i++)
{
temp = str[i];
str[i] = str[len-i-1];
str[len-i-1] = temp;
}
puts(str);
}
return 0;
}