#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
如果觉得我的文章对您有帮助,请随意赞赏:)