图灵原版计算机科学系列

C语言程序设计(英文版第3版)

Stephen G.Kochan (作者)
终止销售
  本书主要讲解如何用C语言编程。书中涵盖了C语言的所有特性,包括ANSI C99标准最新增加的特性。本书通过示例讲解C语言,使用完整的程序来阐释每个新概念,而且对所有C函数都提供了一步一步的说明。此外,每章结尾都配有习题,附录还提供了详细的C语言的小结和标准C语言库,便于快速参考。读者既可从本书中学到语言的基础,又可以学到好的编程实践。
  无论是课堂讲解还是自学,本书都是理想的C语言教材。

输入优惠码:新春特急

电子书每单满200减80,可以用到除夕夜哦,祝大家happy hacking 一整年!

纸书停发:2月3日~26日

纸质书
¥55.00

其他购买方式?

出版信息

  • 书  名C语言程序设计(英文版第3版)
  • 系列书名图灵原版计算机科学系列
  • 执行编辑关于本书的内容有任何问题,请联系 傅志红
  • 出版日期2006-05-30
  • 书  号7-115-14763-9
  • 定  价55.00 元
  • 页  数552
  • 开  本16开
  • 出版状态终止销售
  • 原书名Programming in C
  • 原书号0-672-32666-3

同系列书

本书特色

通过示例讲解C语言,使用完整的C语言程序来阐述每个新概念。
对所有C函数都提供了详细的说明。
书中涵盖了C语言的所有特性,包括ANSI C99标准的最新增加的特性。
每章结尾都配有习题,便于及时巩固所学知识点。
附录提供了详细的C语言的小结和标准C语言库,便于快速参考。

目录

1 Introduction 1
2 Some Fundamentals 5
Programming 5
Higher-Level Languages 6
Operating Systems 6
Compiling Programs 7
Integrated Development Environments 10
Language Interpreters 10
3 Compiling and Running Your First Program 11
Compiling Your Program 11
Running Your Program 12
Understanding Your First Program 13
Displaying the Values of Variables 15
Comments 17
Exercises 19
4 Variables, Data Types, and Arithmetic
Expressions 21
Working with Variables 21
Understanding Data Types and Constants 23
The Basic Integer Type int 23
The Floating Number Type float 24
The Extended Precision Type double 25
The Single Character Type char 25
The Boolean Data Type Bool 26
Type Specifiers: long, long long, short,unsigned,and signed 28
Working with Arithmetic Expressions 30
Integer Arithmetic and the Unary Minus Operator 33
The Modulus Operator 35
Integer and Floating-Point Conversions 36
Combining Operations with Assignment: The Assignment Operators 38
Types, Complex and Imaginary 39
Exercises 40
5 Program Looping 43
The for Statement 44
Relational Operators 46
Aligning Output 50
Program Input 51
Nested for Loops 53
for Loop Variants 54
The while Statement 56
The do Statement 60
The break Statement 62
The continue Statement 62
Exercises 63
6 Making Decisions 65
The if Statement 65
The if-else Construct 69
Compound Relational Tests 72
Nested if Statements 75
The else if Construct 76
The switch Statement 84
Boolean Variables 87
The Conditional Operator 91
Exercises 93
7 Working with Arrays 95
Defining an Array 96
Using Array Elements as Counters 100
Generating Fibonacci Numbers 103
Using an Array to Generate Prime Numbers 104
Initializing Arrays 106
Character Arrays 108
Base Conversion Using Arrays 109
The const Qualifier 111
Multidimensional Arrays 113
Variable-Length Arrays 115
Exercises 117
8 Working with Functions 119
Defining a Function 119
Arguments and Local Variables 122
Function Prototype Declaration 124
Automatic Local Variables 124
Returning Function Results 126
Functions Calling Functions Calling... 131
Declaring Return Types and Argument Types 134
Checking Function Arguments 135
Top-Down Programming 137
Functions and Arrays 137
Assignment Operators 142
Sorting Arrays 143
Multidimensional Arrays 146
Global Variables 152
Automatic and Static Variables 156
Recursive Functions 159
Exercises i62
9 Working with Structures 165
A Structure for Storing the Date 166
Using Structures in Expressions 168
Functions and Structures 171
A Structure for Storing the Time 177
Initializing Structures 180
Compound Literals 181
Arrays of Structures 182
Structures Containing Structures 185
Structures Containing Arrays 187
Structure Variants 190
Exercises 191
10 Character Strings 195
Arrays of Characters 196
Variable-Length Character Strings 198
Initializing and Displaying Character Strings 201
Testing Two Character Strings for Equality 204
Inputting Character Strings 206
Single-Character Input 208
The Null String 213
Escape Characters 216
More on Constant Strings 218
Character Strings, Structures, and Arrays 219
A Better Search Method 222
Character Operations 227
Exercises 230
11 Pointers 235
Defining a Pointer Variable 235
Using Pointers in Expressions 239
Working with Pointers and Structures 240
Structures Containing Pointers 243
Linked Lists 244
The Keyword const and Pointers 253
Pointers and Functions 254
Pointers and Arrays 259
A Slight Digression About Program
Optimization 263
Is It an Array or Is It a Pointer? 264
Pointers to Character Strings 266
Constant Character Strings and Pointers 267
The Increment and Decrement Operators
Operations on Pointers 272
Pointers to Functions 273
Pointers and Memory Addresses 274
Exercises 276
12 Operations on Bits 279
Bit Operators 280
The Bitwise AND Operator 281
The Bitwise Inclusive-OR Operator 283
The Bitwise Exclusive-OR Operator 284
The Ones Complement Operator 285
The Left Shift Operator 287
The Right Shift Operator 287
A Shift Function 288
Rotating Bits 290
Bit Fields 292
Exercises 297
13 The Preprocessor 299
The #define Statement 299
Program Extendability 303
Program Portability 305
More Advanced Types of Definitions 306
The # Operator 312
The ## Operator 313
The #include Statement 313
System Include Files 316
Conditional Compilation 316
The #ifdef, #endif, #else, and #ifndef Statements 316
The #if and #else if Preprocessor Statements 318
The #undef Statement 319
Exercises 320
14 More on Data Types 321
Enumerated Data Types 321
The typedef Statement 325
Data Type Conversions 327
Sign Extension 329
Argument Conversion 329
Exercises 330
15 Working with Larger Programs 333
Dividing Your Program into Multiple Files 333
Compiling Multiple Source Files from the Command Line 334
Communication Between Modules 336
External Variables 336
static Versus Ext ern Variables and Functions 339
Using Header Files Effectively 341
Other Utilities for Working with Larger Programs 342
The make Utility 343
The cvs Utility 344
Unix Utilities: ar, greta, sed, and so on 345
16 Input and Output Operations in C 347
Character I/O: geechar and puechar 348
Formatted I/O: prinef and scanf 348
The printf Function 348
The scanf Function 355
Input and Output Operations with Files 359
Redirecting I/O to a File 359
End of File 361
Special Functions for Working with Files 363
The fopen Function 363
The geec and puec Functions 365
The fclose Function 365
The feof Function 367
The fprinef and fscanf Functions 368
The fgees and fpues Functions 368
stdin, stdout, and stderr 369
The exit Function 370
Renaming and Removing Files 371
Exercises 371
17 Miscellaneous and Advanced Features 373
Miscellaneous Language Statements 373
The goto Statement 373
The null Statement 374
Working with Unions 375
The Comma Operator 378
Type Qualifiers 378
The register Qualifier 378
The volatile Qualifier 379
The restrict Qualifier 379
Command-Line Arguments 380
Dynamic Memory Allocation 383
The calloc and maltoc Functions 384
The sizeof Operator 385
The free Function 387
18 Debugging Programs 389
Debugging with the Preprocessor 389
Debugging Programs with gdb 395
Working with Variables 398
Source File Display 399
Controlling Program Execution 400
Getting a Stack Trace 405
Calling Functions and Setting Arrays and Structures 405
Getting Help with gdb Commands 406
Odds and Ends 408
19 Object-Oriented Programming 411
What Is an Object Anyway? 411
Instances and Methods 412
Writing a C Program to Work with Fractions 413
Defining an Objective-C Class to Work with Fractions 414
Defining a C++ Class to Work with Fractions 419
Defining a C# Class to Work with Fractions 422
A C Language Summary 425
1.0 Digraphs and Identifiers 425
1.1 Digraph Characters 425
1.2 Identifiers 425
2.0 Comments 426
3.0 Constants 427
3.1 Integer Constants 427
3.2 Floating-Point Constants 427
3.3 Character Constants 428
3.4 Character String Constants 429
3.5 Enumeration Constants 430
4.0 Data Types and Declarations 430
4.1 Declarations 430
4.2 Basic Data Types 430
4.3 Derived Data Types 432
4.4 Enumerated Data Types 438
4.5 The typedef Statement 438
4.6 Type Modifiers const, vo1ati1e, and restrict 439
5.0 Expressions 439
5.1 Summary of C Operators 440
5.2 Constant Expressions 442
5.3 Arithmetic Operators 443
5.4 Logical Operators 444
5.5 Relational Operators 444
5.6 Bitwise Operators 445
5.7 Increment and Decrement Operators 445
5.8 Assignment Operators 446
5.9 Conditional Operators 446
5.10 Type Cast Operator 446
5.11 sizeof Operator 447
5.12 Comma Operator 447
5.13 Basic Operations with Arrays 447
5.14 Basic Operations with Structures 448
5.15 Basic Operations with Pointers 448
5.16 Compound Literals 450
5.17 Conversion of Basic Data Types 451
6.0 Storage Classes and Scope 452
6.1 Functions 452
6.2 Variables 452
7.0 Functions 454
7.1 Function Definition 4,54
7.2 Function Call 455
7.3 Function Pointers 456
8.0 Statements 456
8.1 Compound Statements 456
8.2 The Break Statement 4,56
8.3 The continue Statement 457
8.4 The do Statement 457
8.5 The for Statement 457
8.6 The goto Statement 458
8.7 The if Statement 458
8.8 The null Statement 458
8.9 The return Statement 459
8.10 The switch Statement 459
8.11 The while Statement 460
9.0 The Preprocessor 460
9.1 Trigraph Sequences 460
9.2 Preprocessor Directives 461
9.3 Predefined Identifiers 466
B The Standard C Library 467
Standard Header Files 467
<stddef. h>  467
<limits. h> 468
<stdbool. h> 469
<float .h> 469
<stdint.h> 469
String Functions 470
Memory Functions 472
Character Functions 473
I/O Functions 473
In-Memory Format Conversion Functions 478
String-to-Number Conversion 479
Dynamic Memory Allocation Functions 481
Math Functions 482
Complex Arithmetic 488
General Utility Functions 490
C Compiling Programs with gcc 493
General Command Format 493
Command-Line Options 494
D Common Programming Mistakes 497
E Resources 501
Answers to Exercises, Errata, etc. 501
The C Programming Language 501
Books 501
Web Sites 502
Newsgroups 502
C Compilers and Integrated Development Environments 502
gcc 502
MinGW 502
CygWin 502
Visual Studio 503
CodeWarrior 503
Kylix 503
Miscellaneous 503
Object-Oriented Programming 503
The C++ Language 503
The C# Language 503
The Objective-C Language 503
Development Tools 504
Index 505
  • 我院本科生使用的C语言教材为既经典又古老(The C Programming Language,2E, 作者是Kernighan/Ritchie)。其中内容比目前C语言国际标准要陈旧。而由Stephen G. Kochan编写的这本书恰好填补了 K&R 的著作。教材内容叙述自然,也容易理解,因此非常适合于本科生、大专生的教学工作,特别适用于目前采用双语教学的“C语言程序设计”课程。
    cxs  发表于 2006-07-11 17:10:40
合作: 申博开户 棋牌评测 新葡京娱乐场