字符串-04 字符串逆序(15)
来源:互联网 发布:淘宝背景怎么下调 编辑:程序博客网 时间:2024/05/21 22:58
字符串-04. 字符串逆序(15)
时间限制
400 ms
内存限制
65536 kB
代码长度限制
8000 B
判题程序
Standard
作者
白洪欢(浙江大学)
输入一个字符串,对该字符串进行逆序,输出逆序后的字符串。
输入格式:
输入在一行中给出一个不超过80个字符长度的、以回车结束的非空字符串。
输出格式:
在一行中输出逆序后的字符串。
输入样例:Hello World!输出样例:
!dlroW olleH
#include<stdio.h>#include<string.h>int main() {// char *s; 这样会显示段错误 段错误您的程序发生段错误,可能是数组越界,堆栈溢出(比如,递归调用层数太多)等情况引 char s[81]; int l; gets(s); l=strlen(s); for(;l>0;l--) { printf("%c",*(s+l-1)); } return 0; }
0 0
- 字符串-04 字符串逆序(15)
- 字符串-04. 字符串逆序(15)
- 字符串-04. 字符串逆序(15)
- 字符串-04. 字符串逆序(15)
- 字符串-04. 字符串逆序(15)
- 字符串-04. 字符串逆序(15)
- 字符串-04. 字符串逆序(15)
- 字符串逆序(15)
- 字符串逆序
- 字符串逆序
- 字符串逆序
- 字符串逆序
- 字符串 逆序
- 字符串逆序
- 字符串逆序
- 字符串逆序
- 字符串逆序
- 字符串逆序
- 关键字 final & private
- iOS控件之UIButton篇
- leetcode之single number
- MFC中CSliderCtrl的使用(收集)
- ExtJS中的accordion布局如何展开特定的item
- 字符串-04 字符串逆序(15)
- 关于oracle登录出现ORACLE initialization or shutdown in progress
- Android基础和进阶知识总结
- JS event使用方法详解
- ORA-12154: TNS:could not resolve the connect identifier specified
- js forEach
- Effective C++ 条款19
- oracle 查询前一小时、一天、一个月、一年的数据
- 关于shape的corners问题