双语版C程序设计(第3版) / 国外计算机科学教材系列
定价:¥49.00
作者: 保罗·凯利
出版时间:2025-06
出版社:电子工业出版社
- 电子工业出版社
- 9787121503085
- 1-1
- 560139
- 60266977-2
- 平塑
- 16开
- 2025-06
- 427
- 220
- 工学
- 计算机类
- 计算机科学与技术
- 本科 研究生及以上
内容简介
本书由在计算机程序设计方面有着丰富教学和实践经验的中外作者合作编写,并在其第2版的基础上进行了修订与更新。本书内容共14章,由浅入深、全面介绍了C程序设计方法,包括基本数据类型和基本输入/输出方式、各种控制结构和语句、数组和指针、字符串、函数、结构体、文件输入和输出等内容,最后讨论了C编译预处理。本书通俗易懂,所有实例经过精心挑选、贴近生活,尤其强调读者的亲自参与意识。大多数章都为初学者提供了常见错误分析,所选习题可提高读者上机编程的兴趣。本书采用中英文对照混排,既方便初学者熟悉相关概念和内容,也便于英语非母语的读者熟悉英文专业词汇。
目录
目 录
Chapter One Introduction to C(引言) 1
1.1 Brief history of C(C 语言简史) 1
1.2 Why programmers use C(为什么程序员爱用C语言) 1
1.2.1 C is portable 1
1.2.2 C is a structured programming language 2
1.2.3 C is efficient 2
1.2.4 C is flexible 2
1.2.5 C is powerful 2
1.2.6 C is concise 3
1.3 Developing a C program(开发C 程序) 3
1.4 Suggestions for learning C programming(学习C 程序设计的建议) 4
Chapter Two C Data Types(C 数据类型) 6
2.1 Constants(常量) 6
2.2 Variables(变量) 6
2.3 Simple output to the screen(简单的屏幕输出) 8
2.4 Comments(注释) 9
2.5 Data types(数据类型) 10
2.5.1 Short integer data types 10
2.5.2 Long integer data types 11
2.5.3 Unsigned integer data types 11
2.5.4 Double floating-point data type 11
2.6 Data type sizes(数据类型的大小) 11
Programming pitfalls 13
Quick syntax reference 13
Exercises 14
Chapter Three Simple Arithmetic Operations and Expressions(简单的算术运算和表达式) 16
3.1 C operators(C 运算符) 16
3.1.1 The assignment operator 16
3.1.2 Arithmetic operators 17
3.1.3 Increment and decrement operators 19
3.1.4 Combined operators 21
3.2 Operator precedence(运算符优先级) 22
3.3 Type conversions and casts(类型转换与强制类型转换) 24
Programming pitfalls 26
Quick syntax reference 27
Exercises 27
Chapter Four Keyboard Input and Screen Output(键盘输入和屏幕输出) 30
4.1 Simple keyboard input(简单的键盘输入) 30
4.2 Using a width and precision specification in printf
[在函数printf( )中使用域宽和精度说明] 31
4.3 Single-character input and output(单个字符的输入和输出) 33
Programming pitfalls 35
Quick syntax reference 35
Exercises 36
Chapter Five Control Statements: if and switch(控制语句:if 和switch) 38
5.1 The if statement(if 语句) 38
5.2 The if-else statement(if-else 语句) 39
5.3 Logical operators(逻辑运算符) 41
5.4 Nested if statements(嵌套的if 语句) 42
5.5 The switch statement(switch 语句) 44
5.6 The conditional operator ?:(条件运算符?:) 46
Programming pitfalls 47
Quick syntax reference 48
Exercises 48
Chapter Six Iterative Control Statements: while, do-while, and for
(循环控制语句:while、do-while和for) 51
6.1 The while statement(while 语句) 51
6.2 The do-while loop(do-while 循环) 52
6.3 The for statement(for 语句) 54
6.4 Nested loops(嵌套循环) 56
Programming pitfalls 58
Quick syntax reference 59
Exercises 59
Chapter Seven Arrays(数组) 61
7.1 Introduction to arrays(引言) 61
7.2 Initialising arrays(数组初始化) 66
7.3 Two-dimensional arrays(二维数组) 67
7.4 Initialising two-dimensional arrays(二维数组的初始化) 68
7.5 Multi-dimensional arrays(多维数组) 69
Programming pitfalls 70
Quick syntax reference 70
Exercises 70
Chapter Eight Pointers(指针) 73
8.1 Variable addresses(变量的地址) 73
8.2 Pointer variables(指针变量) 74
8.3 The dereference operator *(解引用运算符*) 75
8.4 Why use pointers? (为什么使用指针?) 76
Programming pitfalls 77
Quick syntax reference 77
Exercises 77
Chapter Nine Pointers and Arrays(指针和数组) 79
9.1 Pointers and one-dimensional arrays(指针和一维数组) 79
9.2 Pointers and multi-dimensional arrays(指针和多维数组) 81
9.3 Dynamic memory allocation(动态内存分配) 82
9.3.1 The malloc function 82
9.3.2 The calloc function 85
9.3.3 The realloc function 86
9.3.4 Allocating memory for multi-dimensional arrays 87
Programming pitfalls 90
Quick syntax reference 90
Exercises 90
Chapter Ten Strings(字符串) 93
10.1 String literals(字符串) 93
10.2 Long character strings(长字符串) 94
10.3 Strings and arrays(字符串和数组) 94
10.4 Displaying a string(显示一个字符串) 95
10.5 The puts function[puts( )函数] 97
10.6 The gets function[gets( )函
Chapter One Introduction to C(引言) 1
1.1 Brief history of C(C 语言简史) 1
1.2 Why programmers use C(为什么程序员爱用C语言) 1
1.2.1 C is portable 1
1.2.2 C is a structured programming language 2
1.2.3 C is efficient 2
1.2.4 C is flexible 2
1.2.5 C is powerful 2
1.2.6 C is concise 3
1.3 Developing a C program(开发C 程序) 3
1.4 Suggestions for learning C programming(学习C 程序设计的建议) 4
Chapter Two C Data Types(C 数据类型) 6
2.1 Constants(常量) 6
2.2 Variables(变量) 6
2.3 Simple output to the screen(简单的屏幕输出) 8
2.4 Comments(注释) 9
2.5 Data types(数据类型) 10
2.5.1 Short integer data types 10
2.5.2 Long integer data types 11
2.5.3 Unsigned integer data types 11
2.5.4 Double floating-point data type 11
2.6 Data type sizes(数据类型的大小) 11
Programming pitfalls 13
Quick syntax reference 13
Exercises 14
Chapter Three Simple Arithmetic Operations and Expressions(简单的算术运算和表达式) 16
3.1 C operators(C 运算符) 16
3.1.1 The assignment operator 16
3.1.2 Arithmetic operators 17
3.1.3 Increment and decrement operators 19
3.1.4 Combined operators 21
3.2 Operator precedence(运算符优先级) 22
3.3 Type conversions and casts(类型转换与强制类型转换) 24
Programming pitfalls 26
Quick syntax reference 27
Exercises 27
Chapter Four Keyboard Input and Screen Output(键盘输入和屏幕输出) 30
4.1 Simple keyboard input(简单的键盘输入) 30
4.2 Using a width and precision specification in printf
[在函数printf( )中使用域宽和精度说明] 31
4.3 Single-character input and output(单个字符的输入和输出) 33
Programming pitfalls 35
Quick syntax reference 35
Exercises 36
Chapter Five Control Statements: if and switch(控制语句:if 和switch) 38
5.1 The if statement(if 语句) 38
5.2 The if-else statement(if-else 语句) 39
5.3 Logical operators(逻辑运算符) 41
5.4 Nested if statements(嵌套的if 语句) 42
5.5 The switch statement(switch 语句) 44
5.6 The conditional operator ?:(条件运算符?:) 46
Programming pitfalls 47
Quick syntax reference 48
Exercises 48
Chapter Six Iterative Control Statements: while, do-while, and for
(循环控制语句:while、do-while和for) 51
6.1 The while statement(while 语句) 51
6.2 The do-while loop(do-while 循环) 52
6.3 The for statement(for 语句) 54
6.4 Nested loops(嵌套循环) 56
Programming pitfalls 58
Quick syntax reference 59
Exercises 59
Chapter Seven Arrays(数组) 61
7.1 Introduction to arrays(引言) 61
7.2 Initialising arrays(数组初始化) 66
7.3 Two-dimensional arrays(二维数组) 67
7.4 Initialising two-dimensional arrays(二维数组的初始化) 68
7.5 Multi-dimensional arrays(多维数组) 69
Programming pitfalls 70
Quick syntax reference 70
Exercises 70
Chapter Eight Pointers(指针) 73
8.1 Variable addresses(变量的地址) 73
8.2 Pointer variables(指针变量) 74
8.3 The dereference operator *(解引用运算符*) 75
8.4 Why use pointers? (为什么使用指针?) 76
Programming pitfalls 77
Quick syntax reference 77
Exercises 77
Chapter Nine Pointers and Arrays(指针和数组) 79
9.1 Pointers and one-dimensional arrays(指针和一维数组) 79
9.2 Pointers and multi-dimensional arrays(指针和多维数组) 81
9.3 Dynamic memory allocation(动态内存分配) 82
9.3.1 The malloc function 82
9.3.2 The calloc function 85
9.3.3 The realloc function 86
9.3.4 Allocating memory for multi-dimensional arrays 87
Programming pitfalls 90
Quick syntax reference 90
Exercises 90
Chapter Ten Strings(字符串) 93
10.1 String literals(字符串) 93
10.2 Long character strings(长字符串) 94
10.3 Strings and arrays(字符串和数组) 94
10.4 Displaying a string(显示一个字符串) 95
10.5 The puts function[puts( )函数] 97
10.6 The gets function[gets( )函






