C016:字符串倒置
2024-10-09 11:41:32
代码:
#include "stdafx.h"
#include <string.h> int _tmain(int argc, _TCHAR* argv[])
{
char str[]=""; do{
printf("Enter a number/string:");
scanf("%s",str); printf("%s\n",strrev(str));// 颠倒字符串函数 strrev
}while(strcmp(str,"")!=);// 字符串比较函数strcmp return ;
}
输出:
Enter a number/string: Enter a number/string: Enter a number/string:abc
cba
Enter a number/string:
--2020年6月10日--
最新文章
- ANDROID学习书单
- AngularJS 简介、指令、表达式
- generated clock
- JVM的栈内存
- 设计模式:状态模式(State)
- linux:awk之RS、ORS与FS、OFS
- ◆ 火狐浏览器去除JS方法:
- 【C#学习笔记】改变字体
- jQuery实现等比例缩放大图片让大图片自适应页面布局
- 《算法导论》习题解答 Chapter 22.1-7(关联矩阵的性质)
- 3第一周课后练习&;#183;阅读计划(2)-使用指针来访问私有数据成员
- 一键分享到新浪微博、腾讯微博、搜狐微博、人人网、开心网、百度收藏等js代码大全
- Struts2使用Interceptor实现权限控制的应用实例详解
- FutureTask——另一种闭锁的实现
- dos命令(入门)
- mac下crontab定时任务使用
- 《HTTP权威指南》6-代理
- golang xorm框架的使用
- hdu5992 kdt
- JAVA中日期和时间的格式化选项