| Introduction |
|
ix | |
| Why Use C? |
|
x | |
| How C Works |
|
xi | |
| What You'll Need |
|
xii | |
| About This Book |
|
xiii | |
| Getting Help |
|
xv | |
|
|
|
1 | (18) |
|
|
|
2 | (3) |
|
|
|
5 | (2) |
|
|
|
7 | (5) |
|
Keeping Your Application Open |
|
|
12 | (2) |
|
Adding Comments to Your Source Code |
|
|
14 | (3) |
|
Understanding White Space |
|
|
17 | (2) |
|
Introduction to Data Types |
|
|
19 | (16) |
|
|
|
20 | (4) |
|
Assigning Values to Variables |
|
|
24 | (1) |
|
|
|
25 | (3) |
|
Introduction to Characters |
|
|
28 | (2) |
|
|
|
30 | (2) |
|
Introduction to Constants |
|
|
32 | (3) |
|
|
|
35 | (22) |
|
|
|
36 | (3) |
|
|
|
39 | (5) |
|
Increment and Decrement Operators |
|
|
44 | (3) |
|
|
|
47 | (3) |
|
Understanding Overflow and Underflow |
|
|
50 | (4) |
|
|
|
54 | (3) |
|
|
|
57 | (24) |
|
|
|
58 | (3) |
|
Comparison and Logical Operators |
|
|
61 | (4) |
|
|
|
65 | (3) |
|
|
|
68 | (3) |
|
|
|
71 | (3) |
|
|
|
74 | (4) |
|
|
|
78 | (3) |
|
Standard Input and Output |
|
|
81 | (26) |
|
Inputting a Single Character |
|
|
82 | (5) |
|
Retrieving Whole Word Input |
|
|
87 | (4) |
|
|
|
91 | (4) |
|
|
|
95 | (5) |
|
Validating Keyboard Input |
|
|
100 | (4) |
|
|
|
104 | (3) |
|
|
|
107 | (26) |
|
|
|
108 | (2) |
|
Assigning Values to Arrays |
|
|
110 | (5) |
|
|
|
115 | (3) |
|
Defining Arrays Using Constants |
|
|
118 | (2) |
|
|
|
120 | (3) |
|
|
|
123 | (5) |
|
Using Multidimensional Arrays |
|
|
128 | (5) |
|
Creating Your Own Functions |
|
|
133 | (28) |
|
Creating Simple Functions |
|
|
134 | (4) |
|
Creating Functions That Take Arguments |
|
|
138 | (5) |
|
Creating Functions That Return a Value |
|
|
143 | (6) |
|
Creating Inline Functions |
|
|
149 | (3) |
|
|
|
152 | (4) |
|
Understanding Variable Scope |
|
|
156 | (5) |
|
|
|
161 | (30) |
|
Introduction to the C Preprocessor |
|
|
162 | (7) |
|
|
|
169 | (3) |
|
|
|
172 | (3) |
|
Function-like Macros That Take Arguments |
|
|
175 | (5) |
|
Creating and Including Header Files |
|
|
180 | (4) |
|
|
|
184 | (3) |
|
|
|
187 | (4) |
|
|
|
191 | (32) |
|
Understanding Program Memory |
|
|
192 | (2) |
|
|
|
194 | (4) |
|
Storing and Retrieving Addresses in Pointer Variables |
|
|
198 | (4) |
|
Another Look at Pointer Variables |
|
|
202 | (2) |
|
Dereferencing Pointer Variables |
|
|
204 | (4) |
|
Passing Addresses to Functions |
|
|
208 | (4) |
|
Arrays, Pointers, and Pointer Arithmetic |
|
|
212 | (5) |
|
|
|
217 | (6) |
|
|
|
223 | (32) |
|
Static and Dynamic Memory |
|
|
224 | (5) |
|
|
|
229 | (4) |
|
Allocating Arrays of Dynamic Size |
|
|
233 | (4) |
|
Resizing a Block of Memory |
|
|
237 | (9) |
|
Returning Memory from a Function |
|
|
246 | (6) |
|
|
|
252 | (3) |
|
|
|
255 | (32) |
|
Basic String Pointer Syntax |
|
|
256 | (5) |
|
Finding the Length of a String |
|
|
261 | (4) |
|
Connecting Strings (Concatenation) |
|
|
265 | (4) |
|
|
|
269 | (6) |
|
|
|
275 | (5) |
|
|
|
280 | (7) |
|
|
|
287 | (34) |
|
Opening and Closing Files |
|
|
288 | (6) |
|
|
|
294 | (7) |
|
|
|
301 | (4) |
|
|
|
305 | (2) |
|
|
|
307 | (6) |
|
Reading from Binary Files |
|
|
313 | (3) |
|
Moving Around Within Binary Files |
|
|
316 | (5) |
|
|
|
321 | (32) |
|
Introduction to Structures |
|
|
322 | (7) |
|
|
|
329 | (5) |
|
Using Arrays of Structures |
|
|
334 | (6) |
|
Introduction to Linked Lists |
|
|
340 | (13) |
|
Appendix A: Installing and Using C Tools |
|
|
353 | (12) |
|
|
|
354 | (5) |
|
|
|
359 | (2) |
|
|
|
361 | (1) |
|
|
|
362 | (2) |
|
|
|
364 | (1) |
|
|
|
365 | (6) |
|
|
|
366 | (2) |
|
|
|
368 | (3) |
| Index |
|
371 | |