#include<iostream>
using namespace std;
int main()
{
char x[5];
char *p;
cout << "请输入一个字符串(5位):\n";
cin >> x;
cout << "字符串反转后为:";
for (p = &x[5];p >= x; p--)
{
cout << *p;
}
system("pause");
return 0;
}
Last modification:December 5th, 2018 at 07:18 pm
© 允许规范转载