reverse函数 倒置字符串各个字符位置 3.5
来源:互联网 发布:网上买菜 知乎 编辑:程序博客网 时间:2024/04/28 20:59
#include<ctype.h>#include <stdio.h>#include <string.h>/* reverse function,reverse every char in the sting s*/void reverse(char s[]){//remember the strlen() functionint j=0;int tmp;printf("\nlll");//the fist time I code like this:for(int i=strlen(s)-1;i!=j;)for(int i=strlen(s)-1;i>j;){printf("\nfor");tmp=s[j];s[j++]=s[i];s[i--]=tmp;}}int main(){//test and I always forget add ";" in the end,becareful;char s[]="hello sister huang";reverse(s);printf("\n%s",s);return 0;}
0 0
- reverse函数 倒置字符串各个字符位置 3.5
- 倒置字符串中各个字符位置
- 倒置字符串函数reverse
- 倒置字符串函数reverse
- 字符串倒置函数reverse()的简单写法!
- 倒置函数reverse
- 倒置函数reverse的用法
- 倒置函数reverse的用法
- 倒置函数reverse的用法
- 倒置函数reverse的用法
- 倒置函数reverse的用法
- PHP字符串函数 查找字符位置函数
- reverse对数字和字符串的倒置
- 练习4-13 编写一个递归版本的reverse(s)函数,以将字符串s倒置
- 练习 4-13 编写一个递归版本的 reverse(s)函数,以将字符串 s 倒置
- JS 字符串操作函数 往指定位置插入字符 删除指定位置字符 替换指定位置字符
- JS 字符串操作函数 往指定位置插入字符 删除指定位置字符 替换指定位置字符
- JS 字符串操作函数 往指定位置插入字符 删除指定位置字符 替换指定位置字符
- 文件流示例
- Linux内核源码目录
- spark和shark
- Overridable、Overrides、Shadows的用法
- 【ADB】adb install 使用
- reverse函数 倒置字符串各个字符位置 3.5
- 天行健,君子自强不息
- UIScrollView的详细讲解
- 面试题整理17 输入一个字符串判断一个字符串是否是有效ip地址
- ios 内购开发
- 行人检测论文汇总
- Berkeley EE225B video I note
- 2014_03_20周四工作日志:
- UI Design Basics: 0.4 Nagivation