01 2022 档案

摘要:执行结果截图: 代码: #include "stdio.h"#include "stdlib.h"#include "string.h"//# define DEBUG//# undef DEBUG#ifdef DEBUG# define PRINTF(templt, ...) fprintf(st 阅读全文
posted @ 2022-01-14 22:56 JohnnyH 阅读(149) 评论(0) 推荐(0) 编辑
摘要:执行结果截图: 代码: #include "stdio.h"#include "stdlib.h"# define PRINTF(templt, ...) fprintf(stderr, templt, ##__VA_ARGS__)# define PRINT(format, ...) printf 阅读全文
posted @ 2022-01-14 00:37 JohnnyH 阅读(302) 评论(0) 推荐(0) 编辑
摘要:执行结果截图: 代码: #include "stdio.h"#include "stdlib.h"# define PRINTF(templt, ...) fprintf(stderr, templt, ##__VA_ARGS__)# define PRINT(format, ...) printf 阅读全文
posted @ 2022-01-13 14:17 JohnnyH 阅读(293) 评论(0) 推荐(0) 编辑
摘要:执行结果截图: 代码: #include "stdio.h"# define PRINT(format, ...) printf(# format, ##__VA_ARGS__)// 注意:符号 \ 在宏定义中是代表换行// 注意宏定义里的do{}while(0)语句是故意不打分号,这样在主程序调用 阅读全文
posted @ 2022-01-08 18:41 JohnnyH 阅读(453) 评论(0) 推荐(0) 编辑
摘要:执行结果截图: 代码: #include "stdio.h"#define DEBUG//#undef DEBUG#define PRINT(format, ...) printf(# format, ##__VA_ARGS__) // 定义一个宏连接两个参数 #define TOGETHER(x 阅读全文
posted @ 2022-01-08 00:07 JohnnyH 阅读(108) 评论(0) 推荐(0) 编辑
摘要:执行结果截图: 可以将执行结果截图比对如下的内存布局表(注意:执行结果截图中地址绝对值小的,反而要当作表里的高地址来看,原因待探讨): 代码: #include "stdio.h"#include "stdlib.h"#include "string.h"// 全局变量a在全局初始化区,低地址。in 阅读全文
posted @ 2022-01-07 00:43 JohnnyH 阅读(29) 评论(0) 推荐(0) 编辑
摘要:执行结果截图: 可以将执行结果截图比对如下的内存布局表(注意:执行结果截图中地址绝对值小的,反而要当作表里的高地址来看,原因待探讨): 代码: #include "stdio.h"#include "stdlib.h"void func(void);int global_uninit_var;int 阅读全文
posted @ 2022-01-06 17:16 JohnnyH 阅读(47) 评论(0) 推荐(0) 编辑
摘要:执行结果截图: 代码: #include "stdio.h"#include "stdlib.h"#include "memory.h"int main(){ int * ptr1= NULL; int * ptr2= NULL; int * ptr = NULL; int i, num; int 阅读全文
posted @ 2022-01-06 16:33 JohnnyH 阅读(296) 评论(0) 推荐(0) 编辑
摘要:执行结果截图: 代码: #include "stdio.h"#include "stdlib.h"#include "memory.h"int main(){ int * ptr = NULL; int num, i; printf("请输入待录入整数的个数 : "); scanf("%d", &n 阅读全文
posted @ 2022-01-06 14:39 JohnnyH 阅读(317) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示