Programming in ANSI C

副标题:无

作   者:E Balagurusamy[著]

分类号:

ISBN:9787302264194

微信扫一扫,移动浏览光盘

简介

  《标准c程序设计(第5版)(英文影印版)》是印度各大学使用最广的c语言程序设计经典教材之一,这是其最新的第5版。    《标准c程序设计(第5版)(英文影印版)》以简单而清晰的语言,教授读者如何使用c语言进行程序设计。全书贯彻了“用示例学习”的概念。在深入介绍了c语言的每个特性之后,给出了一个完整的示例程序,用于演示说明其应用。每章末尾的“案例学习”不仅介绍了把c语言的特性集成在一起的常用方法,而且还显示了它在实际生活中的应用。最后一章介绍了开发高效、无错误的c程序的一些指导原则。    《标准c程序设计(第5版)(英文影印版)》在前一版的基础上增加介绍了c99的一些新特性,并增加了不少复习题和项目设计题,而且在附录iv中给出了4个完整的应用程序开发示例,使得本书的实际应用性更强。

目录

《标准c程序设计(第5版)(英文影印版)》

1 overview of c

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

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

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

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

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

5.1 introduction 1/4

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

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

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

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

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 multifileprograms 305

review questions 311

programming exercises 315

10 structures and unions

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

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

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

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 creatinga 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

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

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 i: bit-level programming 474

appendix ii: ascii values of characters 480

appendix iii: ansi c library functions 482

appendix iv: projects 486

appendix v: c99 features 537

bibliography

index


已确认勘误

次印刷

页码 勘误内容 提交人 修订印次

Programming in ANSI C
    • 名称
    • 类型
    • 大小

    光盘服务联系方式: 020-38250260    客服QQ:4006604884

    意见反馈

    14:15

    关闭

    云图客服:

    尊敬的用户,您好!您有任何提议或者建议都可以在此提出来,我们会谦虚地接受任何意见。

    或者您是想咨询:

    用户发送的提问,这种方式就需要有位在线客服来回答用户的问题,这种 就属于对话式的,问题是这种提问是否需要用户登录才能提问

    Video Player
    ×
    Audio Player
    ×
    pdf Player
    ×
    Current View

    看过该图书的还喜欢

    some pictures

    解忧杂货店

    东野圭吾 (作者), 李盈春 (译者)

    loading icon