- Introduction
- Why Use C?
- How C Works
- What YouÕll Need
- About This Book
- Getting Help
- Chapter 1: Getting Started with C
- Basic Syntax
- Printing Text
- Compiling and Running C
- Keeping Your Application Open
- Adding Comments to Your Source Code
- Understanding White Space
- Chapter 2: Introduction to Data Types
- Proper Variable Syntax
- Assigning Values to Variables
- Printing Variables
- Introduction to Characters
- Using Character Strings
- Introduction to Constants
- Chapter 3: Working with Numbers
- Selecting a Number Type
- Performing Arithmetic
- Increment and Decrement Operators
- Understanding Precedence
- Understanding Overflow and Underflow
- Variable Conversion
- Chapter 4: Control Structures
- If Statements
- Comparison and Logical Operators
- Using Else and Else If
- The Ternary Operator
- The Switch Conditional
- The While Loop
- The For Loop
- Chapter 5: Standard Input and Output
- Inputting a Single Character
- Retrieving Whole Word Input
- Reading Numeric Input
- Reading Multiple Inputs
- Validating Keyboard Input
- Advanced printf() Usage
- Chapter 6: Working with Arrays
- Introduction to Arrays
- Assigning Values to Arrays
- Accessing Array Values
- Defining Arrays Using Constants
- Looping through Arrays
- Using Character Arrays
- Using Multidimensional Arrays
- Chapter 7: Creating Your Own Functions
- Creating Simple Functions
- Creating Functions That Take Arguments
- Creating Functions That Return a Value
- Creating Inline Functions
- Using Recursion
- Understanding Variable Scope
- Chapter 8: Using the C Preprocessor
- Introduction to the C Preprocessor
- Using Constants
- Function-like Macros
- Function-like Macros That Take Arguments
- Creating and Including Header Files
- Including Header Files
- Creating Conditionals
- Chapter 9: Working with Pointers
- Understanding Program Memory
- The Address-of Operator
- Storing and Retrieving Addresses
- in Pointer Variables
- Another Look at Pointer Variables
- Dereferencing Pointer Variables
- Passing Addresses to Functions
- Arrays, Pointers, and Pointer Arithmetic
- Arrays of Pointers
- Chapter 10: Managing Memory
- Static and Dynamic Memory
- Type Casts
- Allocating Arrays of Dynamic Size
- Resizing a Block of Memory
- Returning Memory from a Function
- Avoiding Memory Leaks
- Chapter 11: Working with Strings
- Basic String Pointer Syntax
- Finding the Length of a String
- Connecting Strings (Concatenation)
- Comparing Strings
- Copying Strings
- Sorting Strings
- Chapter 12: File Input and Output
- Opening and Closing Files
- Writing to Files
- Reading from Files
- Parsing File Input
- Writing to Binary Files
- Reading from Binary Files
- Moving Around Within Binary Files
- Chapter 13: Advanced Data Types
- Introduction to Structures
- Using typedef
- Using Arrays of Structures
- Introduction to Linked Lists
- Appendix A: Installing and Using C Tools
- Dev-C++ for Windows
- Xcode on Mac OS X
- Unix Tools
- Debugging with GDB
- Other Tools
- Appendix B: Resources
- Web Sites
- Tables