摘要:#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
阅读全文
摘要:初步: 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
阅读全文
摘要:参考: https://book.douban.com/review/5164571/#comments 以下的原则,是我在工作中总结的: 复制代码是危险的。如果有两段相同的代码,几乎可以说一定是有问题的,因为每次改动,要维护两段代码 ?尽量减少IO操作,如操作数据库,网络发送,甚至printf ,
阅读全文
摘要:寄存器 汇编指令 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
阅读全文
摘要:#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
阅读全文
摘要: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
阅读全文
摘要:qsort( 【* 指针,解引用后指向的是 等待排序的元素的类型 的指针数组 】,【count,数组中的指针解引用后的元素的数量】,【size,数组中的指针解引用后的元素的大小】 ,compare 【compare是回调函数,没有()】) int compare(const void *p1,con
阅读全文
摘要: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_
阅读全文
摘要:#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
阅读全文
摘要: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;
阅读全文