华南农业大学:《C程序设计》第九章 预处理命令

第九章预处理命令
第九章 预处理命令

预处理: 编译之前预处理,C语言中有以下三种: 宏定义 文件包含 条件编译
预处理: 编译之前预处理,C语言中有以下三种: ◼ 宏定义 ◼ 文件包含 ◼ 条件编译

9.1宏定义 # define标识符字符串 #define price 3 5 #define array_ size 100 int arraylarray_size] # define宏名(参数表)字符串 #define s(a, b a*b #define s(a pi (a (a* (a *4/3 注意:宏语句后面不需要分号; 宏定义时,可以引用已定义的宏名; 宏定义也有作用域(用 undef终止范围)
9.1 宏定义 #define 标识符 字符串 #define PRICE 3.5 #define array_size 100 int array[array_size] #define 宏名(参数表) 字符串 #define s(a,b) a*b #define s(a) PI*(a)*(a)*(a)*4/3 注意: 宏语句后面不需要分号; 宏定义时,可以引用已定义的宏名; 宏定义也有作用域(用undef终止范围)

9.2“文件包含”处理 #include #include file2. c
9.2 “文件包含”处理 #include #include “file2.c

93条件编译 #ifdef computer a #define Integer size 16 #else #define Integer size 32
9.3 条件编译 #ifdef COMPUTER_A #define INTEGER_SIZE 16 #else #define INTEGER_SIZE 32
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 华南农业大学:《C程序设计》第八章 函数.ppt
- 华南农业大学:《C程序设计》第七章 数组的概念及应用.ppt
- 华南农业大学:《C程序设计》第六章 循环控制.ppt
- 华南农业大学:《C程序设计》第五章 选择结构程序设计.ppt
- 华南农业大学:《C程序设计》第四章 最简单的C程序设计.ppt
- 华南农业大学:《C程序设计》第三章 C语言基础.ppt
- 华南农业大学:《C程序设计》第二章 程序的灵魂一算法.ppt
- 华南农业大学:《C程序设计》第十一章 结构体与共用体.ppt
- 华南农业大学:《C程序设计》第十章 指针.ppt
- 《网页设计技术教程》第9章 创建站点和文档.ppt
- 《网页设计技术教程》第8章 Dreamweaver MX概述.ppt
- 《网页设计技术教程》第7章 设计站点.ppt
- 《网页设计技术教程》第6章 表单.ppt
- 《网页设计技术教程》第5章 网页特效的制作.ppt
- 《网页设计技术教程》第4章 图像、表格与框架.ppt
- 《网页设计技术教程》第3章 网页基本操作.ppt
- 《网页设计技术教程》第2章 FrontPage 2002概述.ppt
- 《网页设计技术教程》第20章 图像的优化.ppt
- 《网页设计技术教程》第1章 网站设计与网页.ppt
- 《网页设计技术教程》第19章 网页动画制作.ppt
- 华南农业大学:《C程序设计》第一章 C语言概述.ppt
- 《Mathematics for Computer》Lecture 13 induction1.pdf
- 《Mathematics for Computer》Lecture 11 Logic.pdf
- 《Mathematics for Computer》Lecture 12 proofs.pdf
- 《Mathematics for Computer》Lecture l4 induction 2.pdf
- 《Mathematics for Computer》Lecture15 induction 3.pdf
- 《Mathematics for Computer》Lecture 16 numtheory 1.pdf
- 《Mathematics for Computer》Lecture 17 numtheory2.pdf
- 《Mathematics for Computer》Lecture19 graphs 2.pdf
- 《Mathematics for Computer》Lecture l8 graphs1.pdf
- 《Mathematics for Computer》Lecture 12 recur2.pdf
- 《Mathematics for Computer》Lecture 10 sums 1.pdf
- 《Mathematics for Computer》counting 1.pdf
- 《Mathematics for Computer》Sums, Approximations, and Asymptotics II.pdf
- 《Mathematics for Computer》Counting Il.pdf
- 《Mathematics for Computer》Counting III.pdf
- 《Mathematics for Computer》Generating functions.pdf
- 《Mathematics for Computer》Conditional Probability.pdf
- 《Mathematics for Computer》Introduction to Probability.pdf
- 《Mathematics for Computer》1 Independent Events.pdf