Code1010
2017-08-31 12:35关于语句倒置 部分理解 c语言实现的
5 #include <stdio.h>
#include <string.h>
void output(char *str)
{
char* tail = strchr(str,' ');
if (tail == NULL)
printf("%s",str);
else
{
output(tail + 1);
*tail = '\0';
printf(" %s",str);
}
}
int main()
{
char str[81];
gets(str);
output(str);
putchar('\n');
return 0;
}
output(tail + 1);
*tail = '\0';
printf(" %s",str);这一段一直没有理解 能否讲解一下
- 点赞
- 回答
- 收藏
- 复制链接分享
4条回答
为你推荐
- 关于语句倒置 部分理解 c语言实现的
- csdn
- c
- 数据结构
- 5个回答