摘要: 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) 编辑
摘要: 1 #include <stdio.h> 2 #include "io_utils.h" 3 #include <stdlib.h> 4 #include <time.h> 5 6 #define PLAYER_COUNT 50 7 8 void SwapElements(int array[], 阅读全文
posted @ 2023-02-02 23:23 泥古拉斯赵四 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 #include "io_utils.h" 3 #include <stdlib.h> 4 #include <time.h> 5 6 #define PLAYER_COUNT 50 7 8 void SwapElement(int array[], i 阅读全文
posted @ 2023-02-02 22:21 泥古拉斯赵四 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 转载自: https://www.bilibili.com/read/cv19939479?from=search&spm_id_from=333.337.0.0 阅读全文
posted @ 2023-02-02 21:50 泥古拉斯赵四 阅读(57) 评论(0) 推荐(0) 编辑
摘要: 如果文件编码是GBK, 那么他会编译成GBK编码,存储起来。 内存里面这么存储。中文是GBK编码存储,而数字和英文, 是以unicode编码存储 GBK编码查询 宽字符,在watch view里面看到的是unicode码点, 在内存中, 是unicode编码存储。 watch view 内存中 ht 阅读全文
posted @ 2023-02-02 21:43 泥古拉斯赵四 阅读(11) 评论(0) 推荐(0) 编辑
摘要: https://godbolt.org 点击Test connection, 选择minGW 编译器 最后就可以看到编译的汇编指令了 阅读全文
posted @ 2023-01-31 21:44 泥古拉斯赵四 阅读(1106) 评论(0) 推荐(0) 编辑
摘要: 下面是线程状态的变化图。 下面是6个状态都是什么。 让我们思考下面的问题。 sleep,wait,join,抢不到锁,等待IO时,线程到底处于什么状态。 话不多说,用代码说话。 sleep时,处于TIMED_WAITING public class Demo2 { public static voi 阅读全文
posted @ 2020-02-26 13:34 泥古拉斯赵四 阅读(421) 评论(0) 推荐(0) 编辑
摘要: 转载自: https://blog.csdn.net/shujuelin/article/details/82423852 int[] arr={6,3,5,1,7,8,11,4,9}; 正序排列。 1.首先拿到一个基准数,例如那数组第一个元素 6为基准数, 2.然后从左边第一个数开始跟基准数比较, 阅读全文
posted @ 2019-12-11 21:49 泥古拉斯赵四 阅读(202) 评论(0) 推荐(0) 编辑