C 语言知识总结
4.1 格式化输出 printf..............................................................................................................20
4.2 格式化输入 scanf.............................................................................................................22
第 5 章 程序结构..........................................................................................................................................23
5.1 if 语句...............................................................................................................................23
5.1.1 逻辑短路................................................................................................................23
5.1.2 运算符优先级对判断的影响...................................................................................24
5.2 switch 语句.......................................................................................................................25
5.3 循环控制程序...................................................................................................................26
第 6 章 数组..................................................................................................................................................26
6.1 一维数组..........................................................................................................................26
6.2 二维数组..........................................................................................................................28
6.3 字符数组..........................................................................................................................29
第 7 章 指针..................................................................................................................................................30
7.1 基本概念..........................................................................................................................30
7.1.1 指针的类型............................................................................................................30
7.1.2 指针所指向的类型.................................................................................................31
7.1.3 指针的值................................................................................................................31
7.1.4 指针本身所占据的内存区......................................................................................31
7.2 指针的算术运算...............................................................................................................31
7.3 指针和数组......................................................................................................................32
7.3.1 数组名的含义.........................................................................................................32
7.3.2 数组指针和指针数组..............................................................................................33
7.3.3 数组越界问题.........................................................................................................33
7.3.4 一维数组的指针运算..............................................................................................34
7.3.5 二维数组的指针运算(重点难点)........................................................................34
7.4 函数指针和指针函数........................................................................................................36
7.5 指针的指针(重点)........................................................................................................37
7.6 指针类型转换...................................................................................................................38
7.7 指针的安全问题...............................................................................................................39
7.7.1 类型转换相关.........................................................................................................39
7.7.2 用指针访问数组元素..............................................................................................40
第 8 章 函数..................................................................................................................................................40
8.1 形参和实参......................................................................................................................40
8.2 数组名作为函数参数........................................................................................................42
8.3 函数的返回值...................................................................................................................42
8.4 函数的调用栈...................................................................................................................43
8.5 局部变量和全局变量........................................................................................................45
8.6 变量的存储类别...............................................................................................................45
8.6.1 程序的内存区域.....................................................................................................45
8.6.2 动态存储和静态存储..............................................................................................46
1 static 变量.............................................................................................................46
2 register 变量.........................................................................................................47
- II -