Chapter One Introduction to C(引言)
1.1 Brief history of C(C語言簡史)
1.2 Why programmers use C(為什么程序員愛用C語言)
1.2.1 C is portable
1.2.2 C is a structured programming language
1.2.3 C is efficient
1.2.4 C is flexible
1.2.5 C is powerful
1.2.6 C is concise
1.3 Developing a C program(開發(fā)C程序)
1.4 Suggestions for learning C Programming(學習C語言程序設(shè)計的建議)
Chapter Two C Data Types(C數(shù)據(jù)類型)
2.1 Constants(常量)
2.2 Variables(變量)
2.3 Simple output to the screen(簡單的屏幕輸出)
2.4 Comments(注釋)
2.5 Data types(數(shù)據(jù)類型)
2.5.1 Short integer data types
2.5.2 Long integer data types
2.5.3 Unsigned integer data types
2.5.4 Double floating-point data type
2.6 Data type sizes(數(shù)據(jù)類型的大?。?br />
Programming pitfalls
Quick syntax reference
Exercises
Chapter Three Simple Arithmetic Operations and
Expressions(簡單的算術(shù)運算和表達式)
3.1 C operators(C運算符)
3.1.1 The assignment operator
3.1.2 Arithmetic operators
3.1.3 Increment and decrement operators
3.1.4 Combined operators
3.2 Operator precedence(運算符優(yōu)先級)
3.3 Type conversions and casts(類型轉(zhuǎn)換與強制類型轉(zhuǎn)換)
Programming pitfalls
Quick syntax reference
Exercises
Chapter Four Keyboard Input and Screen Output(鍵盤輸入和屏幕輸出)
4.1 Simple keyboard input(簡單的鍵盤輸入)
4.2 Using a width and precision specification in printf( )
[在函數(shù)printf( )中使用域?qū)捄途日f明]
4.3 Single-character input and output(單個字符的輸入和輸出)
Programming pitfalls
Quick syntax reference
Exercises
Chapter Five Control Statements: If and
Switch(控制語句:if和switch)
5.1 The if statement(if語句)
5.2 The if-else statement(if-else語句)
5.3 Logical operators(邏輯運算符)
5.4 Nested if statements(嵌套的if語句)
5.5 The switch statement(switch語句)
5.6 The conditional operator ?:(條件運算符)
Programming pitfalls
Quick syntax reference
Exercises
Chapter Six Iterative Control Statements: while, do-while, and
for
(循環(huán)控制語句:while、do-while和for)
6.1 The while statement(while語句)
6.2 The do-while loop(do-while循環(huán))
6.3 The for statement(for語句)
6.4 Nested loops(嵌套的循環(huán))
Programming pitfalls
Quick syntax reference
Exercises
Chapter Nine Pointers and Arrays(指針和數(shù)組)
9.1 Pointers and one-dimensional arrays(指針和一維數(shù)組)
9.2 Pointers and multi-dimensional arrays(指針和多維數(shù)組)
9.3 Dynamic memory allocation(動態(tài)內(nèi)存分配)
9.3.1 The malloc function
9.3.2 The calloc function
9.3.3 The realloc function
9.3.4 Allocating memory for multi-dimensional arrays
Programming pitfalls
Exercises
Chapter Ten Strings(字符串)
10.1 String literals(字符串)
10.2 Long character strings(長字符串)
10.3 Strings and arrays(字符串和數(shù)組)
10.4 Displaying a string(顯示一個字符串)
10.5 The puts function[puts函數(shù)]
10.6 The gets function[gets函數(shù)]
10.7 Accessing individual characters of a string(訪問字符串中的單個字符)
10.8 Assigning a string to a pointer(用字符串為字符指針賦值)
10.9 String functions(字符串處理函數(shù))
10.9.1 Finding the length of a string
10.9.2 Copying a string
10.9.3 String concatenation
10.9.4 Comparing strings
10.9.5 Other string functions
10.10 Converting numeric strings to numbers(數(shù)值字符串向數(shù)值的轉(zhuǎn)換)
10.11 Arrays of strings(字符串數(shù)組)
Programming pitfalls
Quick syntax reference
Exercises