目 錄chapter one typographic conventions(緒論) 11.1 what is a computer program (什么是計(jì)算機(jī)程序 ) 11.2 developing a computer program(開發(fā)計(jì)算機(jī)程序) 21.2.1 program development cycle 21.3 learning c (學(xué)習(xí) c ) 41.4 web site for this book(本書的網(wǎng)站) 41.5 brief history of c (c 簡(jiǎn)史) 41.6 ansi/iso c standard(ansi/iso c 標(biāo)準(zhǔn)) 5chapter two beginning to program in c (c 編程入門) 62.1 constants(常量) 62.2 variables(變量) 62.3 simple output to the screen(簡(jiǎn)單的屏幕輸出) 72.4 comments(注釋) 92.5 data types(數(shù)據(jù)類型) 102.5.1 short integer data types 102.5.2 long integer data types 102.5.3 boolean data types 112.5.4 double floating-point data types 112.5.5 unsigned integer data types 112.6 data type sizes(數(shù)據(jù)類型的大小) 112.7 operators (運(yùn)算符) 122.7.1 the assignment operator 122.7.2 arithmetic operators 122.7.3 increment and decrement operators 132.7.4 combined assignment operators 152.8 operator precedence(運(yùn)算符的優(yōu)先級(jí)) 162.9 data type conversions and casts(類型轉(zhuǎn)換和強(qiáng)轉(zhuǎn)) 18programming pitfalls 20quick syntax reference 21exercises 22chapter three keyboard input and screen output(鍵盤輸入和屏幕輸出) 263.1 simple keyboard input(簡(jiǎn)單的鍵盤輸入) 263.2 manipulators(流操縱符) 283.3 single-character input and output(單個(gè)字符的輸入和輸出) 30programming pitfalls 32quick syntax reference 32exercises 32chapter four selection and iteration(選擇與循環(huán)) 344.1 selection(選擇) 344.1.1 the if statement 344.1.2 the if-else statement 354.1.3 compound statements 354.1.4 logical operators 374.1.5 nested if statements 374.1.6 the switch statement 374.1.7 the conditional operator : 394.2 iteration(循環(huán)) 404.2.1 the while statement 404.2.2 the do-while loop 424.2.3 the for statement 434.2.4 nested loops 45programming pitfalls 47quick syntax reference 49exercises 50chapter five arrays and structures(數(shù)組和結(jié)構(gòu)體) 535.1 arrays(數(shù)組) 535.1.1 introduction 535.1.2 initialising an array 565.1.3 two-dimensional arrays 575.1.4 initialising a two-dimensional array 595.1.5 multi-dimensional arrays 605.2 structures(結(jié)構(gòu)體) 605.2.1 introduction 605.2.2 declaring a structure 615.2.3 initialising a structure variable 635.2.4 nested structures 645.3 the typedef statement(typedef 語句) 655.4 arrays of structures(結(jié)構(gòu)體數(shù)組) 665.5 enumerated data types(枚舉數(shù)據(jù)類型) 66programming pitfalls 68quick syntax reference 68exercises 69chapter six strings(字符串) 726.1 c-strings(c 風(fēng)格字符串) 726.2 c-string input and output(c 風(fēng)格字符串的輸入和輸出) 736.3 accessing individual characters of a c-string(訪問c 風(fēng)格字符串中的單個(gè)字符) 776.4 c-string functions(c 風(fēng)格字符串函數(shù)) 776.4.1 finding the length of a c-string 786.4.2 copying a c-string 786.4.3 c-string concatenation 796.4.4 comparing c-strings 796.4.5 other c-string functions 796.4.6 converting numeric c-strings to numbers 806.5 c strings(c 字符串) 806.5.1 string initialisation and assignment 826.5.2 string concatenation 846.5.3 string length, string indexing and sub-strings 856.5.4 string replace, erase, insert and empty strings 866.5.5 string searching 886.5.6 string comparisons 896.5.7 string input 916.5.8 string conversions 926.6 arrays of strings(string 類型的數(shù)組) 936.7 character classification(字符分類) 94programming pitfalls 96quick syntax reference 96exercises 97chapter seven functions(函數(shù)) 1007.1 introduction(引言) 1007.2 function arguments(函數(shù)實(shí)參) 1027.3 default parameter values(默認(rèn)的形參值) 1057.4 returning a value from a function(從函數(shù)返回一個(gè)值) 1067.5 inline functions(內(nèi)聯(lián)函數(shù)) 1077.6 passing arguments by value(按值傳遞實(shí)參) 1087.7 passing arguments by reference(按引用傳遞實(shí)參) 1097.8 passing a one-dimensional array to a function(向函數(shù)傳遞一維數(shù)組) 1127.9 passing a multi-dimensional array to a function(向函數(shù)傳遞多維數(shù)組) 1157.10 passing a structure variable to a function(向函數(shù)傳遞結(jié)構(gòu)體變量) 1167.11 passing a string to function(向函數(shù)傳遞字符串) 1187.11.1 passing a c string to a function 1187.11.2 passing a c-string to a function 1197.12 recursion(遞歸) 1207.13 function overloading(函數(shù)重載) 1227.14 storage classes auto and static (auto 和static 存儲(chǔ)類型) 1237.14.1 auto 1237.14.2 static 1247.15 the scope of a variable(變量的作用域) 1257.15.1 block scope 1257.15.2 global scope 1267.15.3 reusing a variable name 1277.16 mathemat