随笔分类 - C
摘要:1 #include 2 #include 3 #define N 5 4 5 6 char *mycpy(char *s1, char *s2) 7 { 8 //数组型 9 /* int i;10 while(s2[i] != '\0') {11 ...
阅读全文
摘要:写自己的strcat函数------→mycmp 1 #include 2 #include 3 #define N 5 4 5 int mycmp(char *s1, char *s2) 6 { 7 //数组型 8 /* int i = 0; 9 while(s1[i]...
阅读全文
摘要:写自己的strcat函数------→mycat 1 #include 2 #include 3 #define N 5 4 5 char *mycat(char *s1, char *s2) 6 { 7 //数组型 8 /* int i = 0; 9 while(s1[...
阅读全文
摘要:1. gets与fgets gets函数原型:char*gets(char*buffer);//读取字符到数组:gets(str);str为数组名。 gets函数功能:从键盘上输入字符,直至接受到换行符或EOF时停止,并将读取的结果存放在buffer指针所指向的字符数组中。 读取...
阅读全文
摘要:写自己的 strlen 函数-----→ mystrlen 1 #include 2 #include 3 #define N 100 4 5 int mylen(char *s) 6 { 7 //数组型 8 // int cnt = 0; 9 // while(s[cn...
阅读全文

浙公网安备 33010602011771号