摘要: 1 #include <stdio.h> 2 #include "io_utils.h" 3 #include <stdlib.h> 4 #include <time.h> 5 6 void SwapInt(int *a, int *b) { 7 int temp = *a; 8 *a = *b; 阅读全文
posted @ 2023-02-04 17:09 泥古拉斯赵四 阅读(4) 评论(1) 推荐(0) 编辑
摘要: 第一版: 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 #include <io_utils.h> 5 6 void Swap(int a,int b){ 7 int temp=a; 8 a=b; 9 b=tem 阅读全文
posted @ 2023-02-04 16:35 泥古拉斯赵四 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <io_utils.h> 4 5 // 1 6 int *(f1(int, double)); 7 8 // 2 9 int (*f2)(int, double); 10 11 // 3 12 阅读全文
posted @ 2023-02-04 16:03 泥古拉斯赵四 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 动态内存分配的函数 *ptr = malloc(sizeof(int) * length);动态分配内存 players = calloc(PLAYER_COUNT, sizeof(int));会清空动态分配的内存 players = realloc(players, PLAYER_COUNT * 阅读全文
posted @ 2023-02-04 15:43 泥古拉斯赵四 阅读(24) 评论(0) 推荐(0) 编辑
摘要: RAZ是EAX的高32位,RDX是EDX的高32位。 低32位清零,高32位也会清零 阅读全文
posted @ 2023-02-04 14:37 泥古拉斯赵四 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 #include <io_utils.h> 3 4 int main() { 5 { 6 int a = 2; 7 int *p = &a; 8 9 PRINT_INT(p + 1); 10 PRINT_INT(p); 11 PRINT_INT(size 阅读全文
posted @ 2023-02-04 14:04 泥古拉斯赵四 阅读(35) 评论(0) 推荐(0) 编辑
摘要: NULL 野指针 pointer_at_large 就是一个野指针 1 #include <stdio.h> 2 #include <io_utils.h> 3 4 int *pointer_at_large; 5 6 void DangerousPointer() { 7 int a = 2; 8 阅读全文
posted @ 2023-02-04 13:49 泥古拉斯赵四 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 编译器是visual studio 代码 1 #include <stdio.h> 2 #include <io_utils.h> 3 4 int main() { 5 int a; 6 scanf("%d", &a); 7 8 int *p = &a; 9 PRINT_HEX(p); 10 PRI 阅读全文
posted @ 2023-02-04 13:31 泥古拉斯赵四 阅读(11) 评论(0) 推荐(0) 编辑