C语言常见字符串函数实现
摘要:#include #include #include int my_strlen(char *s) { assert(s!=NULL); int count=0; while(*s!='\0') { s++; count++; } return count; } char *my_strcpy(char *...
阅读全文
单链表的逆置(不带头结点)
摘要:#include #include typedef struct node { int data; struct node *next; }Node; Node *Initiate(Node *linklist) { linklist=NULL; return linklist; } Node* creatlist_end(Node *linklist)//尾插法 { int...
阅读全文