思路:现将整个字符串反转,再将每个单词反转;#include "iostream" #include "cstring" using namespace std; void reverse_word(char*p,char*q){ char temp; while(q>p){ temp=*p; *p=*q; *q=temp; q--; p++; } } char* indexofnoletter(char*p){ char*t=p; while(*t!=' '&&*t!='