标准C程序设计 第5版 影印版 英文PDF电子书下载
- 电子书积分:16 积分如何计算积分?
- 作 者:E Balagurusamy著
- 出 版 社:北京:清华大学出版社
- 出版年份:2011
- ISBN:7302264194
- 页数:549 页
1 Overview of C 1
1.1 History of C 1
1.2 Importance of C 3
1.3 Sample Program 1:Printing a Message 3
1.4 Sample Program 2:Adding Two Numbers 6
1.5 Sample Program 3:Interest Calculation 8
1.6 Sample Program 4:Use of Subroutines 10
1.7 Sample Program 5:Use of Math Functions 11
1.8 Basic Structure of C Programs 12
1.9 Programming Style 14
1.10 Executing a'C' Program 14
1.11 Unix System 16
1.12 Ms-Dos System 18
Review Questions 19
Programming Exercises 20
2 Constants,Variables,and Data Types 23
2.1 Introduction 23
2.2 Character Set 23
2.3 C Tokens 25
2.4 Keywords and Identifiers 25
2.5 Constants 26
2.6 Variables 30
2.7 Data Types 31
2.8 Declaration of Variables 34
2.9 Declaration of Storage Class 37
2.10 Assigning Values to Variables 38
2.11 Defining Symbolic Constants 44
2.12 Declaring a Variable as Constant 45
2.13 Declaring a Variable as Volatile 45
2.14 Overflow and Underflow of Data 46
Review Questions 49
Programming Exercises 51
3 Operators and Expressions 52
3.1 Introduction 52
3.2 Arithmetic Operators 52
3.3 Relational Operators 55
3.4 Logical Operators 57
3.5 Assignment Operators 57
3.6 Increment and Decrement Operators 59
3.7 Conditional Operator 61
3.8 Bitwise Operators 61
3.9 Special Operators 61
3.10 Arithmetic Expressions 63
3.11 Evaluation of Expressions 64
3.12 Precedence of Arithmetic Operators 65
3.13 Some Computational Problems 67
3.14 Type Conversions in Expressions 68
3.15 Operator Precedence and Associativity 72
3.16 Mathematical Functions 74
Review Questions 78
Programming Exercises 81
4 Managing Input and Output Operations 84
4.1 Introduction 84
4.2 Reading a Character 85
4.3 Writing a Character 88
4.4 Formatted Input 89
4.5 Formatted Output 98
Review Questions 110
Programming Exercises 112
5 Decision Making and Branching 114
5.1 Introduction 114
5.2 Decision Making with IF Statement 114
5.3 Simple IF Statement 115
5.4 The IF.....ELSE Statement 119
5.5 Nesting of IF....ELSE Statements 122
5.6 The ELSE IF Ladder 126
5.7 The Switch Statement 129
5.8 The ?: Operator 133
5.9 The GOTO Statement 136
Review Questions 144
Programming Exercises 148
6 Decision Making and Looping 152
6.1 Introduction 152
6.2 The WHILE Statement 154
6.3 The DO Statement 157
6.4 The FOR Statement 159
6.5 Jumps in LOOPS 166
6.6 Concise Test Expressions 174
Review Questions 182
Programming Exercises 186
7 Arrays 190
7.1 Introduction 190
7.2 One-dimensional Arrays 192
7.3 Declaration of One-dimensional Arrays 193
7.4 Initialization of One-dimensional Arrays 195
7.5 Two-dimensional Arrays 199
7.6 Initializing Two-dimensional Arrays 204
7.7 Multi-dimensional Arrays 208
7.8 Dynamic Arrays 209
7.9 More about Arrays 209
Review Questions 223
Programming Exercises 225
8 Character Arrays and Strings 229
8.1 Introduction 229
8.2 Declaring and Initializing String Variables 230
8.3 Reading Strings from Terminal 231
8.4 Writing Strings to Screen 236
8.5 Arithmetic Operations on Characters 241
8.6 Putting Strings Together 242
8.7 Comparison of Two Strings 244
8.8 String-handling Functions 244
8.9 Table of Strings 250
8.10 Other Features of Strings 252
Review Questions 257
Programming Exercises 259
9 User-defined Functions 262
9.1 Introduction 262
9.2 Need for User-defined Functions 262
9.3 A Multi-function Program 263
9.4 Elements of User-defined Functions 266
9.5 Definition of Functions 267
9.6 Return Values and their Types 269
9.7 Function Calls 270
9.8 Function Declaration 272
9.9 Category of Functions 274
9.10 No Arguments and no Return Values 274
9.11 Arguments but no Return Values 277
9.12 Arguments with Return Values 280
9.13 No Arguments but Returns a Value 284
9.14 Functions that Return Multiple Values 285
9.15 Nesting of Functions 286
9.16 Recursion 288
9.17 Passing Arrays to Functions 289
9.18 Passing Strings to Functions 294
9.19 The Scope,Visibility and Lifetime of Variables 295
9.20 Multifile Programs 305
Review Questions 311
Programming Exercises 315
10 Structures and Unions 317
10.1 Introduction 317
10.2 Defining a Structure 317
10.3 Declaring Structure Variables 319
10.4 Accessing Structure Members 321
10.5 Structure Initialization 322
10.6 Copying and Comparing Structure Variables 324
10.7 Operations on Individual Members 326
10.8 Arrays of Structures 327
10.9 Arrays within Structures 329
10.10 Structures within Structures 331
10.11 Structures and Functions 333
10.12 Unions 335
10.13 Size of Structures 337
10.14 Bit Fields 337
Review Questions 344
Programming Exercises 348
11 Pointers 351
11.1 Introduction 351
11.2 Understanding Pointers 351
11.3 Accessing the Address of a Variable 354
11.4 Declaring Pointer Variables 355
11.5 Initialization of Pointer Variables 356
11.6 Accessing a Variable through its Pointer 358
11.7 Chain of Pointers 360
11.8 Pointer Expressions 361
11.9 Pointer Increments and Scale Factor 362
11.10 Pointers and Arrays 364
11.11 Pointers and Character Strings 367
11.12 Array of Pointers 369
11.13 Pointers as Function Arguments 370
11.14 Functions Returning Pointers 373
11.15 Pointers to Functions 373
11.16 Pointers and Structures 376
11.17 Troubles with Pointers 379
Review Questions 385
Programming Exercises 388
12 File Management in C 389
12.1 Introduction 389
12.2 Defining and Opening a File 390
12.3 Closing a File 391
12.4 Input/Output Operations on Files 392
12.5 Error Handling During I/O Operations 398
12.6 Random Access to Files 400
12.7 Command Line Arguments 405
Review Questions 408
Programming Exercises 409
13 Dynamic Memory Allocation and Linked Lists 411
13.1 Introduction 411
13.2 Dynamic Memory Allocation 411
13.3 Allocating a Block of Memory:MALLOC 413
13.4 Allocating Multiple Blocks of Memory:CALLOC 415
13.5 Releasing the Used Space:Free 415
13.6 Altering the Size of a Block:REALLOC 416
13.7 Concepts of Linked Lists 417
13.8 Advantages of Linked Lists 420
13.9 Types of Linked Lists 421
13.10 Pointers Revisited 422
13.11 Creating a Linked List 424
13.12 Inserting an Item 428
13.13 Deleting an Item 431
13.14 Application of Linked Lists 433
Review Questions 440
Programming Exercises 442
14 The Preprocessor 444
14.1 Introduction 444
14.2 Macro Substitution 445
14.3 File Inclusion 449
14.4 Compiler Control Directives 450
14.5 ANSI Additions 453
Review Questions 456
Programming Exercises 457
15 Developing a C Program:Some Guidelines 458
15.1 Introduction 458
15.2 Program Design 458
15.3 Program Coding 460
15.4 Common Programming Errors 462
15.5 Program Testing and Debugging 469
15.6 Program Efficiency 471
Review Questions 472
Appendix Ⅰ:Bit-level Programming 474
Appendix Ⅱ:ASCII Values of Characters 480
Appendix Ⅲ:ANSI C Library Functions 482
Appendix Ⅳ:Projects 486
Appendix Ⅴ:C99 Features 537
Bibliography 545
Index 547
- 《指向核心素养 北京十一学校名师教学设计 英语 七年级 上 配人教版》周志英总主编 2019
- 《大学英语四级考试全真试题 标准模拟 四级》汪开虎主编 2012
- 《设计十六日 国内外美术院校报考攻略》沈海泯著 2018
- 《计算机辅助平面设计》吴轶博主编 2019
- 《高校转型发展系列教材 素描基础与设计》施猛责任编辑;(中国)魏伏一,徐红 2019
- 《景观艺术设计》林春水,马俊 2019
- 《全国学前教育专业(新课程标准)“十三五”规划教材 简谱手风琴教程 第2版》(中国)杨克勤,王宝庆 2019
- 《程序逻辑及C语言编程》卢卫中,杨丽芳主编 2019
- 《高等教育双机械基础课程系列教材 高等学校教材 机械设计课程设计手册 第5版》吴宗泽,罗圣国,高志,李威 2018
- 《指向核心素养 北京十一学校名师教学设计 英语 九年级 上 配人教版》周志英总主编 2019
- 《中风偏瘫 脑萎缩 痴呆 最新治疗原则与方法》孙作东著 2004
- 《水面舰艇编队作战运筹分析》谭安胜著 2009
- 《王蒙文集 新版 35 评点《红楼梦》 上》王蒙著 2020
- 《TED说话的力量 世界优秀演讲者的口才秘诀》(坦桑)阿卡什·P.卡里亚著 2019
- 《燕堂夜话》蒋忠和著 2019
- 《经久》静水边著 2019
- 《魔法销售台词》(美)埃尔默·惠勒著 2019
- 《微表情密码》(波)卡西亚·韦佐夫斯基,(波)帕特里克·韦佐夫斯基著 2019
- 《看书琐记与作文秘诀》鲁迅著 2019
- 《酒国》莫言著 2019
- 《大学计算机实验指导及习题解答》曹成志,宋长龙 2019
- 《指向核心素养 北京十一学校名师教学设计 英语 七年级 上 配人教版》周志英总主编 2019
- 《大学生心理健康与人生发展》王琳责任编辑;(中国)肖宇 2019
- 《大学英语四级考试全真试题 标准模拟 四级》汪开虎主编 2012
- 《大学英语教学的跨文化交际视角研究与创新发展》许丽云,刘枫,尚利明著 2020
- 《北京生态环境保护》《北京环境保护丛书》编委会编著 2018
- 《复旦大学新闻学院教授学术丛书 新闻实务随想录》刘海贵 2019
- 《大学英语综合教程 1》王佃春,骆敏主编 2015
- 《大学物理简明教程 下 第2版》施卫主编 2020
- 《指向核心素养 北京十一学校名师教学设计 英语 九年级 上 配人教版》周志英总主编 2019