目?录
1?Introduction to Computers, the Internet and the Web
计算机、因特网和万维网导论33
1.1?Introduction
引言34
1.2?Hardware and Software
计算机硬件和软件35
1.3?Data Hierarchy
数据的层次结构37
1.4?Machine Languages, Assembly Languages and High-Level Languages
机器语言、汇编语言和高级语言40
1.5?The C Programming Language
C程序设计语言41
1.6?C Standard Library
C标准库42
1.7?C and Other C-Based Languages?
C 和其他基于C的程序设计语言43
1.8?Object Technology
对象技术44
1.9?Typical C Program-Development Environment
典型的C程序开发环境47
1.10?Test-Driving a C Application in Windows, Linux and Mac OS X
在Windows、Linux和Mac OS X上测试并运行一个C应用程序49
1.11?Operating Systems
操作系统59
1.12?The Internet and World Wide Web
因特网和万维网61
1.13?Some Key Software Terminology
一些重要的软件术语64
1.14?Keeping Up-to-Date with Information Technologies
跟上信息技术的发展66
2?Introduction to C Programming
C程序设计入门71
2.1?Introduction
引言72
2.2?A Simple C Program: Printing a Line of Text
一个简单的C程序:打印一行文字72
2.3?Another Simple C Program: Adding Two Integers
另一个简单的C程序:两个整数求和76
2.4?Memory Concepts
存储单元的基本概念80
2.5?Arithmetic in C
C语言中的算术运算81
2.6?Decision Making: Equality and Relational Operators
做出决策:相等和关系运算符85
2.7?Secure C Programming
安全的C程序设计89
3?Structured Program Development in C
结构化的C程序设计101
3.1?Introduction
引言102
3.2?Algorithms
算法102
3.3?Pseudocode
伪代码102
3.4?Control Structures
控制结构103
3.5?The if Selection Statement
if条件语句105
3.6?The if…else Selection Statement
if…else条件语句106
3.7?The while Iteration Statement
while循环语句110
3.8?Formulating Algorithms Case Study 1: Counter-Controlled Iteration
算法设计案例1:计数控制的循环111
3.9?Formulating Algorithms with Top-Down, Stepwise Refinement
Case Study 2: Sentinel-Controlled Iteration
自顶向下、逐步求精的算法设计案例2:标记控制的循环114
3.10?Formulating Algorithms with Top-Down, Stepwise Refinement
Case Study 3: Nested Control Statements
自顶向下、逐步求精的算法设计案例3:嵌套控制结构120
3.11?Assignment Operators
赋值运算符124
3.12?Increment and Decrement Operators
增1和减1运算符125
3.13?Secure C Programming
安全的C程序设计127
4?C Program Control
C程序控制145
4.1?Introduction
引言146
4.2?Iteration Essentials
循环的基本原理146
4.3?Counter-Controlled Iteration
计数控制的循环147
4.4?for Iteration Statement
for循环语句148
4.5?for Statement: Notes and Observations
for语句:注意事项151
4.6?Examples Using the for Statement
使用 for语句的例子152
4.7?switch Multiple-Selection Statement
switch多重选择语句155
4.8?do…while Iteration Statement
do…while循环语句161
4.9?break and continue Statements
break和continue语句162
4.10?Logical Operators
逻辑运算符164
4.11?Confusing Equality (=?=) and Assignment (=) Operators
区分相等运算符(=?=)和赋值运算符(=)167
4.12?Structured Programming Summary
结构化程序设计小结169
4.13?Secure C Programming
安全的C程序设计174
5?C Functions
C函数189
5.1?Introduction
引言190
5.2?Modularizing Programs in C
C语言中的程序模块190
5.3?Math Library Functions
数学库函数191
5.4?Functions
函数193
5.5?Function Definitions
函数定义193
5.6?Function Prototypes: A Deeper Look
函数原型:深入学习198
5.7?Function Call Stack and Stack Frames
函数调用堆栈及活动记录堆栈帧200
5.8?Headers
头文件204
5.9?Passing Arguments By Value and By Reference
按值或按引用传递参数205
5.10?Random Number Generation
随机数的生成206
5.11?Example: A Game of Chance; Introducing enum
案例分析:运气游戏;引入enum210
5.12?Storage Classes
存储类型214
5.13?Scope Rules
作用域的规定216
5.14?Recursion
递归219
5.15?Example Using Recursion: Fibonacci Series
递归应用案例:Fibonacci数列222
5.16?Recursion vs. Iteration
递归与迭代226
5.17?Secure C Programming
安全的C程序设计227
6?C Arrays
C数组246
6.1?Introduction
引言247
6.2?Arrays
数组247
6.3?Defining Arrays
数组定义249
6.4?Array Examples
数组实例249
6.5?Using Character Arrays to Store and Manipulate Strings
用字符数组来存储和处理字符串257
6.6?Static Local Arrays and Automatic Local Arrays
静态局部数组和自动局部数组260
6.7?Passing Arrays to Functions
将数组传递给函数262
6.8?Sorting Arrays
数组排序266
6.9?Case Study: Computing Mean, Median and Mode Using Arrays
案例分析:用数组来计算平均值、中值和众数268
6.10?Searching Arrays
数组查找273
6.11?Multidimensional Arrays
多下标数组278
6.12?Variable-Length Arrays
可变长数组285
6.13?Secure C Programming
安全的C程序设计288
7?C Pointers
C指针306
7.1?Introduction
引言307
7.2?Pointer Variable Definitions and Initialization
指针变量的定义和初始化308
7.3?Pointer Operators
指针运算符309
7.4?Passing Arguments to Functions by Reference
按引用向函数传递实参311
7.5?Using the const Qualifier with Pointers
对指针使用const限定符315
7.6?Bubble Sort Using Pass-by-Reference
采用按引用传递的冒泡排序321
7.7?sizeof Operator
sizeof运算符324
7.8?Pointer Expressions and Pointer Arithmetic
指针表达式和指针算术运算327
7.9?Relationship between Pointers and Arrays
指针和数组的关系330
7.10?Arrays of Pointers
指针数组334
7.11?Case Study: Card Shuffling and Dealing Simulation
案例研究:模拟扑克牌的洗牌和发牌335
7.12?Pointers to Functions
指向函数的指针340
7.13?Secure C Programming
安全的C程序设计345
8?C Characters and Strings
C字符和字符串365
8.1?Introduction
引言366
8.2?Fundamentals of Strings and Characters
字符串和字符基础366
8.3?Character-Handling Library
字符处理函数库368
8.4?String-Conversion Functions
字符串转换函数374
8.5?Standard Input/Output Library Functions
标准输入/输出库函数376
8.6?String-Manipulation Functions of the String-Handling Library
字符串处理函数库中的字符串处理函数381
8.7?Comparison Functions of the String-Handling Library
字符串处理函数库中的比较函数383
8.8?Search Functions of the String-Handling Library
字符串处理函数库中的查找函数385
8.9?Memory Functions of the String-Handling Library
字符串处理函数库中的内存处理函数391
8.10?Other Functions of the String-Handling Library
字符串处理函数库中的其他函数395
8.11?Secure C Programming
安全的C程序设计397
9?C Formatted Input/Output
C格式化输入/输出409
9.1?Introduction
引言410
9.2?Streams
流410
9.3?Formatting Output with printf
用printf函数实现格式化输出410
9.4?Printing Integers
打印整数411
9.5?Printing Floating-Point Numbers
打印浮点数412
9.6?Printing Strings and Characters
打印字符串或字符414
9.7?Other Conversion Specifiers
其他的转换说明符415
9.8?Printing with Field Widths and Precision
带域宽和精度的打印416
9.9?Using Flags in the printf Format Control String
在printf函数的格式控制字符串中使用标记419
9.10?Printing Literals and Escape Sequences
打印文本和转义序列422
9.11?Reading Formatted Input with scanf
用scanf函数读取格式化的输入422
9.12?Secure C Programming
安全的C程序设计429
10?C Structures, Unions, Bit Manipulation and Enumerations
C结构体、共用体、位操作和枚举类型436
10.1?Introduction
引言437
10.2?Structure Definitions
结构体的定义437
10.3?Initiali