02 2021 档案

cp -r的linux C语言实现
摘要:#include<stdio.h> #include<sys/types.h> #include<sys/stat.h> #include<fcntl.h> #include<unistd.h> #include<string.h> #include<dirent.h> #define ARGS_C 阅读全文

posted @ 2021-02-24 21:42 平ping 阅读(508) 评论(0) 推荐(0)

makefile简单的笔记
摘要:初步: main:main.o func.o gcc mian.o func.o -o main #生成main函数 main.o:mian.c gcc -c main.c -o main.o #生成main.o func.o:func.c gcc -c func.c -o func.o #生成fu 阅读全文

posted @ 2021-02-22 22:18 平ping 阅读(97) 评论(0) 推荐(0)

todo
摘要:参考: https://book.douban.com/review/5164571/#comments 以下的原则,是我在工作中总结的: 复制代码是危险的。如果有两段相同的代码,几乎可以说一定是有问题的,因为每次改动,要维护两段代码 ?尽量减少IO操作,如操作数据库,网络发送,甚至printf , 阅读全文

posted @ 2021-02-21 16:15 平ping 阅读(130) 评论(0) 推荐(0)

汇编相关
摘要:寄存器 汇编指令 push_*_ 压栈 (l:16位,q:32位) pop_*_ 弹栈 (l:16位,q:32位) mov_*_(from,to) 移动 * 位的数据 (l:16位,q:32位) call 调用函数 ret 返回 lea_*_(from,to) 将from的地址加载到to中 (l:1 阅读全文

posted @ 2021-02-20 23:19 平ping 阅读(62) 评论(0) 推荐(0)

七大排序——C实现
摘要:#include<stdio.h> #include<stdlib.h> #include<string.h> #include<time.h> #define MAX_NUM_SIZE 20000000 #define MAX_RANDOM_NUM 100 #define SWAP(a,b){in 阅读全文

posted @ 2021-02-16 21:50 平ping 阅读(62) 评论(0) 推荐(0)

C语言——txt词频统计
摘要:1 #define _CRT_SECURE_NO_WARNINGS 2 #include<stdio.h> 3 #include<stdlib.h> 4 #include<string.h> 5 #define MAXKEY 2000 6 #define MAX_WORD_SIZE 30 7 8 i 阅读全文

posted @ 2021-02-09 18:02 平ping 阅读(308) 评论(0) 推荐(0)

C——qsort()排序指针数组的概括用法
摘要:qsort( 【* 指针,解引用后指向的是 等待排序的元素的类型 的指针数组 】,【count,数组中的指针解引用后的元素的数量】,【size,数组中的指针解引用后的元素的大小】 ,compare 【compare是回调函数,没有()】) int compare(const void *p1,con 阅读全文

posted @ 2021-02-06 21:41 平ping 阅读(271) 评论(0) 推荐(0)

C——数组元素的二叉树创建
摘要:1 int main() { 2 char c[] = "ABCDEFGHIJ"; 3 pTreeNode_t pArr[MAX_SIZE_OF_TREE]; 4 for (int i = 0; i < MAX_SIZE_OF_TREE; i++) { 5 pArr[i] = (pTreeNode_ 阅读全文

posted @ 2021-02-03 23:58 平ping 阅读(183) 评论(0) 推荐(0)

C语言链表——头插法和尾插法
摘要:#define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> typedef struct ListNode{ int val; ListNode* next; }Node_t, *pNode_t; void print_l 阅读全文

posted @ 2021-02-02 20:59 平ping 阅读(450) 评论(0) 推荐(0)

C语言——创建动态二维数组
摘要:int main() { int **a; int row, column; int count = 0; scanf("%d%d", &row, &column); a = (int **)malloc(row * sizeof(int *)); for (int i = 0; i < row; 阅读全文

posted @ 2021-02-01 21:05 平ping 阅读(494) 评论(0) 推荐(0)