解题思路:
注意事项:
参考代码:
#include<iostream>
#include<string.h>
using namespace std;
int main()
{
char str[20] = {0};
cin >> str;
char *p = &str[0];
int size = strlen(str);
cout << size << endl;
while(*p != 0)
{
cout << *p << " ";
p++;
}
printf("\n");
p =&str[size-1];
while(size--)
{
cout << *p;
p--;
}
return 0;
}
0.0分
0 人评分