2021年3月30日

摘要: 最基础的二分法算法C int search_digit(int *num,int cnt,int target) { int first = 0; int last = cnt - 1; int mid;/* |x x x x o| -> |x x m x o| x m x */ while(fir 阅读全文
posted @ 2021-03-30 14:41 real-watson 阅读(79) 评论(0) 推荐(0)
 
摘要: strcpy和strncpy摘于linux 内核源码的/lib/string.c char *self_strcpy(char *dest, const char *src) { char *tmp = dest; while ((*dest++ = *src++) != '\0') /* noth 阅读全文
posted @ 2021-03-30 12:01 real-watson 阅读(504) 评论(0) 推荐(0)