码迷,mamicode.com
首页 >  
搜索关键字:mystrcat    ( 12个结果
6-37 mystrcat (20 分)
编写一个函数 char* mystrcat(char *s1, const char *s2) 函数功能是把字符串s2的所有元素连接到字符串s1之后。 ###函数接口定义: 函数接口: char* mystrcat(char *s1, const char *s2); 把字符串s2的所有元素连接到字 ...
分类:其他好文   时间:2021-06-29 15:31:37    阅读次数:0
mystrcat
#include //如果一个数组做为函数的形参传递,那么数组可以在被调用的函数中修改 //有时候不希望这个事发生,所以对形参采用const参数 //size_t strlen(const char *s); //strcpy(char* s1,const char* s2); void mystr... ...
分类:其他好文   时间:2019-06-12 00:54:29    阅读次数:118
mystrcat
#include char * strcat(char *strDest,const char * strSrc) { char *r=strDest; char *p=strDest; while(*p++ != '\0'); p--; while(*strSrc != '\0') { *p++ ... ...
分类:其他好文   时间:2018-09-08 15:27:19    阅读次数:150
实现两个字符串连接
char *Mystrcat(char*str1, char* str2){ if (str1 == NULL || str2 == NULL) return NULL; char*temp = str1; //申请指向字符的指针 while (*str1 != '\0') { str1++; // ...
分类:其他好文   时间:2018-05-30 19:27:30    阅读次数:157
九度oj 题目1490:字符串链接
题目1490:字符串链接 时间限制:1 秒 内存限制:128 兆 特殊判题:否 提交:2610 解决:1321 题目描述: 不用strcat 函数,自己编写一个字符串链接函数MyStrcat(char dstStr[],charsrcStr[]) 输入: 两个字符串,字符串由小写字母组成。 输出: ...
分类:其他好文   时间:2017-03-01 13:00:38    阅读次数:140
typedef的使用2
#include <stdio.h> #include <string.h> #pragma warning(disable:4996) //闲言碎语都先不要讲了,直接上函数吧。字符串拼接函数 const char *myStrcat(const char *, const char *); //m
分类:其他好文   时间:2016-03-04 22:18:33    阅读次数:197
字符串链接strcat
1 #include "stdafx.h" 2 #include "iostream" 3 #include "assert.h" 4 #include "string" 5 6 using namespace std; 7 8 char* mystrcat(char* dest, const ch
分类:其他好文   时间:2016-02-23 11:04:40    阅读次数:128
实现mystrcpy(), mystrcmp(), mystrcat(), mystrlen()
#include #include #include /* mystrcpy: 复制字符串from 中的字符到字符串to, 包括空值结束符。*//* mystrcmp: 比较字符串str1 and str2 返回值 解释 less than 0 str1 is less than str2 e...
分类:其他好文   时间:2016-01-07 07:46:05    阅读次数:254
系统函数C字符串的实现(10):strcat
字符串拼接strcatchar *mystrcat(char *dest,const char *source) { char *pstart = dest; while (*pstart != '\0') { pstart++; } //从尾部 while ((*pstart++)=(*source++)) { } } void main() { char str1[22]...
分类:其他好文   时间:2015-08-16 02:10:08    阅读次数:129
自写字符串连接函数strcat
#include #define STRLEN 100 char *mystrcat(char *dest,const char *src) { char *ret = dest; while(*dest != '\0') { dest++; } while(*dest++ = *src++) { ; } return ret; } int main() { char ...
分类:其他好文   时间:2015-04-14 00:48:13    阅读次数:195
12条   1 2 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!