C 语言实例 - 字符串翻转
C 语言教程
· 2019-02-20 23:11:27
使用递归来翻转字符串。
实例 - 字符串翻转
#include <stdio.h>
void reverseSentence();
int main()
{
printf("输入一个字符串: ");
reverseSentence();
return 0;
}
void reverseSentence()
{
char c;
scanf("%c", &c);
if( c != '\n')
{
reverseSentence();
printf("%c",c);
}
}
输出结果为:
输入一个字符串: codercto boonur
点击查看所有 C 语言教程 文章: https://www.codercto.com/courses/l/17.html
Algorithms of the Intelligent Web
Haralambos Marmanis、Dmitry Babenko / Manning Publications / 2009-7-8 / GBP 28.99
Web 2.0 applications provide a rich user experience, but the parts you can't see are just as important-and impressive. They use powerful techniques to process information intelligently and offer featu......一起来看看 《Algorithms of the Intelligent Web》 这本书的介绍吧!