![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笔试题...
文章平均质量分 63
CNnumen
If i want , i must try...
展开
-
用C语言实现一个revert函数,它的功能是将输入的字符串在原串上倒序后返回...
<br />#include <cstdlib> #include <iostream> #include <algorithm> using namespace std; const int MAX = 256; int main(int argc, char *argv[]) { char ch[MAX]; cin >> ch; int size = strlen(ch) - 1; int halfSize = (size + 1) / 2原创 2010-07-28 09:24:00 · 2494 阅读 · 0 评论 -
memmove实现...
<br />#include <cstdlib> #include <iostream> using namespace std; const int MAX = 100; void* __memmove(void* dest, const void* src, size_t n) { assert(dest != NULL && src != NULL); char *ptrDest = static_cast<char*>(dest); const c原创 2010-07-28 09:34:00 · 687 阅读 · 0 评论 -
去除字符串中的数字...
<br />/*删除字符串中的数字并压缩字符串(神州数码以前笔试题), 如字符串"abc123de4fg56"处理后变为"abcdefg"。注意空间和效率*/ #include <cstdlib> #include <iostream> using namespace std; void hanStr(char *str) { int len = strlen(str); int index = 0; for(int i=0; i<len; i++)原创 2010-09-25 23:08:00 · 3258 阅读 · 0 评论