随笔分类 -  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 ... 阅读全文
posted @ 2014-08-16 21:54 Acalm 阅读(7564) 评论(0) 推荐(0)
摘要:写自己的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]... 阅读全文
posted @ 2014-08-14 20:52 Acalm 阅读(9189) 评论(0) 推荐(0)
摘要:写自己的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[... 阅读全文
posted @ 2014-08-13 18:01 Acalm 阅读(6435) 评论(0) 推荐(0)
摘要:1. gets与fgets gets函数原型:char*gets(char*buffer);//读取字符到数组:gets(str);str为数组名。 gets函数功能:从键盘上输入字符,直至接受到换行符或EOF时停止,并将读取的结果存放在buffer指针所指向的字符数组中。 读取... 阅读全文
posted @ 2014-08-12 18:14 Acalm 阅读(32472) 评论(2) 推荐(4)
摘要:写自己的 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... 阅读全文
posted @ 2014-08-01 13:57 Acalm 阅读(1507) 评论(0) 推荐(0)