逆序输出字符串 print the array in reverse order
来源:互联网 发布:mac系统强制退出程序 编辑:程序博客网 时间:2024/05/16 11:46
void ReversePrint(char* ch){if(ch == NULL){cout << "NULL"<<endl;return;}int size = strlen(ch);for(int i = size-1; i >=0; i--)cout << ch[i];}
void ReversePrint(char * ch) //recursion{if(*ch == '\0')return;ReversePrint(ch+1);printf("%c",*ch);}
void ReversePrintStringUsingStack(char* ch)//stack{stack<char> s;for(int i = 0; i < strlen(ch); i++)s.push(ch[i]);for(int i = 0; i < strlen(ch); i++){printf("%c ",s.top());//or cout << s.top(); reverse prints.pop();}}
0 0
- 逆序输出字符串 print the array in reverse order
- Print an array in spiral order -- Microsoft
- 杭电ACM1321——Reverse Text~~逆序输出字符串
- leetcode 151. Reverse Words in a String 字符串分割逆序
- 字符串逆序&字符串逆序输出
- Print the numbers of form 2^i.5^j in increasing order -- Google
- Print A Tree In Vertical Order
- 逆序输出字符串
- 字符串逆序输出
- 字符串逆序输出
- 字符串的逆序输出
- 递归逆序输出字符串
- 逆序输出字符串
- 逆序输出字符串
- 实现字符串逆序输出
- 字符串逆序输出
- NYOJ - 字符串逆序输出
- 字符串逆序输出
- XP之后Windows的一些变化
- 小议socket关闭
- Class.forName() 和 ClassLoader.loadClass()的区别?
- COM思想的背后
- 怎样才算会一门编程语言
- 逆序输出字符串 print the array in reverse order
- 理解程序内存
- OCP-1Z0-053-200题-136题-47
- C/C++中可变参数的原理
- uva 1326 - Jurassic Remains(暴力+位运算+中间相遇法)
- linux订制安装及Linux常见命令
- C++中实现回调机制的几种方式
- 经典问题总结(二)
- vb6 拆分命令行手册中的输出参数