5.2.3 逻辑表达式.............................................................................................................................74
5.3 if 语句.........................................................................................................................................75
5.3.1 if 语句的三种形式..................................................................................................................75
5.3.2 if 语句的嵌套..........................................................................................................................78
5.3.3 条件运算符和条件表达式.....................................................................................................80
5.4 switch 语句.................................................................................................................................81
5.5 程序举例....................................................................................................................................82
6 循环控制.......................................................................................................................................83
6.1 概述............................................................................................................................................83
6.2 goto 语句以及用 goto 语句构成循环.......................................................................................84
6.3 while 语句..................................................................................................................................84
6.4 do-while 语句.............................................................................................................................86
6.5 for 语句.......................................................................................................................................89
6.6 循环的嵌套................................................................................................................................91
6.7 几种循环的比较........................................................................................................................91
6.8 break 和 continue 语句...............................................................................................................92
6.8.1 break 语句...............................................................................................................................92
6.8.2 continue 语句.........................................................................................................................93
6.9 程序举例....................................................................................................................................94
7 数组...............................................................................................................................................95
7.1 一维数组的定义和引用............................................................................................................96
7.1.1 一维数组的定义方式.............................................................................................................96
7.1.2 一维数组元素的引用.............................................................................................................97
7.1.3 一维数组的初始化.................................................................................................................98
7.1.4 一维数组程序举例.................................................................................................................99
7.2 二维数组的定义和引用..........................................................................................................100
7.2.1 二维数组的定义...................................................................................................................100
7.2.2 二维数组元素的引用...........................................................................................................101
7.2.3 二维数组的初始化...............................................................................................................102
7.2.4 二维数组程序举例...............................................................................................................103
7.3 字符数组..................................................................................................................................103
7.3.1 字符数组的定义...................................................................................................................103
7.3.2 字符数组的初始化...............................................................................................................104
7.3.3 字符数组的引用...................................................................................................................104
7.3.4 字符串和字符串结束标志...................................................................................................105
7.3.5 字符数组的输入输出...........................................................................................................105
7.3.6 字符串处理函数...................................................................................................................107
7.4 程序举例..................................................................................................................................109
7.5 本章小结..................................................................................................................................112
8 函 数............................................................................................................................................112
8.1 概述..........................................................................................................................................112
8.2 函数定义的一般形式..............................................................................................................114
8.3 函数的参数和函数的值..........................................................................................................115
8.3.1 形式参数和实际参数...........................................................................................................115