01 2022 档案
摘要:执行结果截图: 代码: #include "stdio.h"#include "stdlib.h"#include "string.h"//# define DEBUG//# undef DEBUG#ifdef DEBUG# define PRINTF(templt, ...) fprintf(st
阅读全文
摘要:执行结果截图: 代码: #include "stdio.h"#include "stdlib.h"# define PRINTF(templt, ...) fprintf(stderr, templt, ##__VA_ARGS__)# define PRINT(format, ...) printf
阅读全文
摘要:执行结果截图: 代码: #include "stdio.h"#include "stdlib.h"# define PRINTF(templt, ...) fprintf(stderr, templt, ##__VA_ARGS__)# define PRINT(format, ...) printf
阅读全文
摘要:执行结果截图: 代码: #include "stdio.h"# define PRINT(format, ...) printf(# format, ##__VA_ARGS__)// 注意:符号 \ 在宏定义中是代表换行// 注意宏定义里的do{}while(0)语句是故意不打分号,这样在主程序调用
阅读全文
摘要:执行结果截图: 代码: #include "stdio.h"#define DEBUG//#undef DEBUG#define PRINT(format, ...) printf(# format, ##__VA_ARGS__) // 定义一个宏连接两个参数 #define TOGETHER(x
阅读全文
摘要:执行结果截图: 可以将执行结果截图比对如下的内存布局表(注意:执行结果截图中地址绝对值小的,反而要当作表里的高地址来看,原因待探讨): 代码: #include "stdio.h"#include "stdlib.h"#include "string.h"// 全局变量a在全局初始化区,低地址。in
阅读全文
摘要:执行结果截图: 可以将执行结果截图比对如下的内存布局表(注意:执行结果截图中地址绝对值小的,反而要当作表里的高地址来看,原因待探讨): 代码: #include "stdio.h"#include "stdlib.h"void func(void);int global_uninit_var;int
阅读全文
摘要:执行结果截图: 代码: #include "stdio.h"#include "stdlib.h"#include "memory.h"int main(){ int * ptr1= NULL; int * ptr2= NULL; int * ptr = NULL; int i, num; int
阅读全文
摘要:执行结果截图: 代码: #include "stdio.h"#include "stdlib.h"#include "memory.h"int main(){ int * ptr = NULL; int num, i; printf("请输入待录入整数的个数 : "); scanf("%d", &n
阅读全文