早教吧 育儿知识 作业答案 考试题库 百科 知识分享

写一函数voidfun(char*s)实现如下单词倒序功能:如s为字符串“astFVsULLY”,经过此函数后,s的内容将变为:“tsasVFYLLU”每个单词倒序,整个句子不倒序。

题目详情
写一函数void fun(char *s)实现如下单词倒序功能:如s为字符串“ast FVs ULLY”,经过此函数后,s的内容将变为:“tsa sVF YLLU” 每个单词倒序,整个句子不倒序。
▼优质解答
答案和解析
//---------------------------------------------------------------------------
#include
#include
void reverse(char *b,char *e)
{
char ch;
while (b