關(guān)于我們
書(shū)單推薦
新書(shū)推薦
|
雙語(yǔ)版C程序設(shè)計(jì)(第2版)
本書(shū)由在計(jì)算機(jī)程序設(shè)計(jì)方面有著豐富教學(xué)和實(shí)踐經(jīng)驗(yàn)的中外作者合作編寫(xiě)。共14章內(nèi)容,由淺入深全面介紹C程序設(shè)計(jì)方法,包括基本數(shù)據(jù)類型和基本輸出輸出方式、各種控制結(jié)構(gòu)和語(yǔ)句、指針和數(shù)組、字符串、函數(shù)、結(jié)構(gòu)、文件輸入和輸出等內(nèi)容,*后討論了C預(yù)處理器。本書(shū)所有實(shí)例經(jīng)過(guò)精心挑選、貼近生活,尤其強(qiáng)調(diào)讀者的親自參與意識(shí)。每章都為初學(xué)者提供了常見(jiàn)錯(cuò)誤分析,所選習(xí)題可提高讀者上機(jī)編程的興趣。本書(shū)采用中英文對(duì)照混排,既方便初學(xué)者熟悉相關(guān)概念和內(nèi)容,也便于英文非母語(yǔ)的讀者熟悉英文專業(yè)詞匯。
國(guó)內(nèi)首次出版的中英文對(duì)照混排式雙語(yǔ)版C 程序設(shè)計(jì)教材的姐妹篇。
內(nèi)容通俗易懂,例子貼近生活,尤其強(qiáng)調(diào)讀者的親自參與意識(shí)。 每章都為初學(xué)者提供了常見(jiàn)錯(cuò)誤分析,每章結(jié)尾有很多有趣的習(xí)題。 Preface Is a comprehensive introduction to C programming.
為了適應(yīng)國(guó)內(nèi)高等教育逐步與國(guó)際接軌的發(fā)展趨勢(shì),英語(yǔ)教學(xué)和雙語(yǔ)教學(xué)越來(lái)越受到人們的重視。尤其是以國(guó)際化、工業(yè)化為辦學(xué)理念并注重國(guó)際化、工業(yè)化人才培養(yǎng)的國(guó)家示范性軟件學(xué)院的部分課程,還常常邀請(qǐng)一些外籍教師來(lái)國(guó)內(nèi)進(jìn)行全英語(yǔ)授課。但是由于辦學(xué)經(jīng)費(fèi)有限,國(guó)內(nèi)學(xué)生的英語(yǔ)水平又參差不齊,導(dǎo)致全英語(yǔ)教學(xué)目前還無(wú)法普及。因此,利用國(guó)內(nèi)的優(yōu)秀師資(包括留學(xué)回國(guó)人員)進(jìn)行雙語(yǔ)教學(xué)成為首選。針對(duì)目前許多雙語(yǔ)課程教學(xué)缺少雙語(yǔ)版教材的問(wèn)題,我們組織國(guó)內(nèi)和國(guó)外大學(xué)教師合作編寫(xiě)了本書(shū)。
Paul Kelly,愛(ài)爾蘭都柏林工業(yè)大學(xué)(DIT)的高級(jí)講師Paul Kelly。Kelly 老師長(zhǎng)期從事程序設(shè)計(jì)類課程的教學(xué)工作,在程序設(shè)計(jì)類課程教學(xué)方面教學(xué)實(shí)踐經(jīng)驗(yàn)豐富,在國(guó)外已先后出版多本程序設(shè)計(jì)語(yǔ)言類書(shū)籍。蘇小紅,哈爾濱工業(yè)大學(xué)計(jì)算機(jī)學(xué)院博士生導(dǎo)師,計(jì)算機(jī)應(yīng)用技術(shù)專家,研究領(lǐng)域主要是色彩匹配,信息融合,空間計(jì)算,人工神經(jīng)網(wǎng)絡(luò),進(jìn)化算法,計(jì)算機(jī)圖形學(xué),灰色預(yù)測(cè),彩色圖像處理等。
Chapter One Introduction to C(引言)1
1.1 Brief history of C(C 語(yǔ)言簡(jiǎn)史)1 1.2 Why programmers use C(為什么程序員愛(ài)用C語(yǔ)言)1 1.2.1 C is portable1 1.2.2 C is a structured programming language2 1.2.3 C is efficient2 1.2.4 C is flexible2 1.2.5 C is powerful2 1.2.6 C is concise3 1.3 Developing a C program(開(kāi)發(fā)C 程序)3 1.4 Suggestions for learning C programming(學(xué)習(xí)C 語(yǔ)言程序設(shè)計(jì)的建議)4 Chapter Two C Data Types(C數(shù)據(jù)類型)6 2.1 Constants(常量)6 2.2 Variables(變量)6 2.3 Simple output to the screen(簡(jiǎn)單的屏幕輸出)8 2.4 Comments(注釋)9 2.5 Data types(數(shù)據(jù)類型)10 2.5.1 Short integer data types10 2.5.2 Long integer data types11 2.5.3 Unsigned integer data types11 2.5.4 Double floating-point data type11 2.6 Data type sizes(數(shù)據(jù)類型的大。11 Programming pitfalls13 Quick syntax reference13 Exercises14 Chapter Three Simple Arithmetic Operations and Expressions(簡(jiǎn)單的算術(shù)運(yùn)算和表達(dá)式)16 3.1 C operators(C 運(yùn)算符)16 3.1.1 The assignment operator16 3.1.2 Arithmetic operators17 3.1.3 Increment and decrement operators19 3.1.4 Combined operators21 3.2 Operator precedence(運(yùn)算符優(yōu)先級(jí))22 3.3 Type conversions and casts(類型轉(zhuǎn)換與強(qiáng)制類型轉(zhuǎn)換)24 Programming pitfalls26 Quick syntax reference27 Exercises27 Chapter Four Keyboard Input and Screen Output(鍵盤(pán)輸入和屏幕輸出)30 4.1 Simple keyboard input(簡(jiǎn)單的鍵盤(pán)輸入)30 4.2 Using a width and precision specification in printf() [在函數(shù)printf( )中使用域?qū)捄途日f(shuō)明]31 4.3 Single-character input and output(單個(gè)字符的輸入和輸出)33 Programming pitfalls35 Quick syntax reference35 Exercises36 Chapter Five Control Statements: if and switch(控制語(yǔ)句:if 和switch)38 5.1 The if statement(if 語(yǔ)句)38 5.2 The if-else statement(if-else 語(yǔ)句)39 5.3 Logical operators(邏輯運(yùn)算符)41 5.4 Nested if statements(嵌套的if 語(yǔ)句)42 5.5 The switch statement(switch 語(yǔ)句)44 5.6 The conditional operator ?:(條件運(yùn)算符)46 Programming pitfalls47 Quick syntax reference48 Exercises48 Chapter Six Iterative Control Statements: while, do-while, and for (循環(huán)控制語(yǔ)句:while、do-while和for)51 6.1 The while statement(while 語(yǔ)句)51 6.2 The do-while loop(do-while 循環(huán))52 6.3 The for statement(for 語(yǔ)句)54 6.4 Nested loops(嵌套的循環(huán))56 Programming pitfalls58 Quick syntax reference59 Exercises59 Chapter Seven Arrays(數(shù)組)61 7.1 Introduction to arrays(引言)61 7.2 Initialising arrays(數(shù)組初始化)66 7.3 Two-dimensional arrays(二維數(shù)組)67 7.4 Initialising two-dimensional arrays(二維數(shù)組的初始化)68 7.5 Multi-dimensional arrays(多維數(shù)組)69 Programming pitfalls70 Quick syntax reference70 Exercises70 Chapter Eight Pointers(指針)73 8.1 Variable addresses(變量的地址)73 8.2 Pointer variables(指針變量)74 8.3 The dereference operator *(解引用運(yùn)算符*)75 8.4 Why use pointers? (為什么使用指針)76 Programming pitfalls77 Quick syntax reference77 Exercises77 Chapter Nine Pointers and Arrays(指針和數(shù)組)79 9.1 Pointers and one-dimensional arrays(指針和一維數(shù)組)79 9.2 Pointers and multi-dimensional arrays(指針和多維數(shù)組)81 9.3 Dynamic memory allocation(動(dòng)態(tài)內(nèi)存分配)82 9.3.1 The malloc() function82 9.3.2 The calloc() function85 9.3.3 The realloc() function86 9.3.4 Allocating memory for multi-dimensional arrays87 Programming pitfalls90 Quick syntax reference90 Exercises90 Chapter Ten Strings(字符串)93 10.1 String literals(字符串)93 10.2 Long character strings(長(zhǎng)字符串)94 10.3 Strings and arrays(字符串和數(shù)組)94 10.4 Displaying a string(顯示一個(gè)字符串)95 10.5 The puts() function[puts( )函數(shù)]97 10.6 The gets() function[gets( )函數(shù)]98 10.7 Accessing individual characters of a string(訪問(wèn)字符串中的單個(gè)字符)99 10.8 Assigning a string to a pointer (用字符串為字符指針賦值)100 10.9 String functions(字符串處理函數(shù))101 10.9.1 Finding the length of a string101 10.9.2 Copying a string102 10.9.3 String concatenation102 10.9.4 Comparing strings102 10.9.5 Other string functions103 10.10 Converting numeric strings to numbers (數(shù)值字符串向數(shù)值的轉(zhuǎn)換)103 10.11 Arrays of strings(字符串?dāng)?shù)組)105 Programming pitfalls108 Quick syntax reference109 Exercises109 Chapter Eleven Functions(函數(shù))112 11.1 Introduction(引言)112 11.2 Function arguments(函數(shù)參數(shù))114 11.3 Returning a value from a function (從函數(shù)返回一個(gè)值)116 11.4 Passing arguments by value (按值傳參)118 11.5 Passing arguments by reference(按引用傳參)119 11.6 Changing arguments in a function (在函數(shù)中改變實(shí)參的值)120 11.7 Passing a one-dimensional array to a function (向函數(shù)傳遞一維數(shù)組)121 11.8 Passing a multi-dimensional array to a function (向函數(shù)傳遞多維數(shù)組)123 11.9 Storage classes(變量的存儲(chǔ)類型)124 11.9.1 auto124 11.9.2 static125 11.9.3 extern126 11.9.4 register128 11.10 Command line arguments (命令行參數(shù))128 11.11 Mathematical functions(數(shù)學(xué)函數(shù))130 11.11.1 Some commonly used trigonometric functions130 11.11.2 Other common mathematical functions131 11.11.3 Pseudo-random number functions132 11.11.4 Some time-related functions132 11.12 Recursion133 Programming pitfalls136 Quick syntax reference137 Exercises137 Chapter Twelve Structures(結(jié)構(gòu)體)141 12.1 Defining a structure(定義結(jié)構(gòu)體)141 12.2 Pointers to structures(結(jié)構(gòu)體指針)144 12.3 Initialising a structure variable (結(jié)構(gòu)體變量的初始化)145 12.4 Passing a structure to a function (向函數(shù)傳遞結(jié)構(gòu)體變量)147 12.5 Nested structures(嵌套的結(jié)構(gòu)體)149 12.6 Including a structure template from a file (從文件中引用結(jié)構(gòu)體模板)150 12.7 The typedef statement (typedef 語(yǔ)句)151 12.8 Arrays of structures(結(jié)構(gòu)體數(shù)組)152 12.9 Enumerated data types(枚舉數(shù)據(jù)類型)158 Programming pitfalls160 Quick syntax reference161 Exercises162 Chapter Thirteen File Input and Output(文件的輸入和輸出)165 13.1 Binary and ASCII (text) files [二進(jìn)制文件和ASCII(文本)文件]165 13.2 Opening and closing files (文件的打開(kāi)和關(guān)閉)166 13.3 Reading a character from a file using fgetc() [使用函數(shù)fgetc( )從文件中讀字符]168 13.4 Writing a character to a file using fputc() [使用函數(shù)fputc( )向文件中寫(xiě)字符]170 13.5 Reading a string of characters from a file using fgets() 。凼褂煤瘮(shù)fgets( )從文件中讀字符串]171 13.6 Writing a string of characters to a file using fputs() [使用函數(shù)fputs( )向文件中寫(xiě)字符串]172 13.7 Formatted input-output to a file using fscanf() and fprintf()173 。凼褂煤瘮(shù)fscanf( )和fprintf( )進(jìn)行文件的格式化讀寫(xiě)]173 13.8 The standard files(標(biāo)準(zhǔn)文件)174 13.9 Block input-output using fread() and fwrite()175 [使用函數(shù)fread( )和fwrite( )進(jìn)行塊讀寫(xiě)]175 13.10 Rewinding a file using rewind()[使用函數(shù)rewind( )對(duì)文件重定位]177 13.11 Random access of files using fseek() [使用函數(shù)fseek( )隨機(jī)訪問(wèn)文件]179 13.12 Finding the position in a file using ftell() 。凼褂煤瘮(shù)ftell( )查找文件的當(dāng)前位置]184 13.13 Deleting a file using remove()[使用函數(shù)remove( )刪除文件]184 Programming pitfalls185 Quick syntax reference186 Exercises187 Chapter Fourteen The C Preprocessor(C編譯預(yù)處理)190 14.1 Including files(包含文件)190 14.2 Defining macros(定義宏)191 14.3 Macro parameters(帶參數(shù)的宏)192 14.4 Macros and functions(宏和函數(shù))194 14.5 Some useful macros(一些有用的宏)195 14.6 Conditional directive
你還可能感興趣
我要評(píng)論
|