Introduction |
Getting Started with C for Linux Programming |
This Book's Special Features |
Making a Better Book / Example 1: |
Conventions Used in This Book |
At a Glance / Week 1: |
Where You're Going |
Introduction to Linux and the C Programming Language / Day 1: |
Why Use C? |
Preparing to Program |
The Program Development Cycle |
Getting Started with Linux |
The Components of a C Program: Code and Data / Day 2: |
A Short C Program |
The Program's Components |
A Review of the Parts of a Program |
Storing Data: Variables and Constants |
Variables |
Numeric Variable Types |
Constants |
Statements, Expressions, and Operators / Day 3: |
Statements |
Understanding Expressions |
Operators |
The if Statement |
Evaluating Relational Expressions |
The Logical Operators |
Operator Precedence Revisited |
Functions: The Basics / Day 4: |
What Is a Function? |
How a Function Works |
Functions and Structured Programming |
Writing a Function |
Passing Arguments to a Function |
Calling Functions |
Where the Functions Belong |
Basic Program Control / Day 5: |
Arrays: The Basics |
Controlling Program Execution |
Nested Loops |
Fundamentals of Input and Output / Day 6: |
Displaying Information Onscreen |
Inputting Numeric Data with scanf() |
Using Numeric Arrays / Day 7: |
What Is an Array? |
Naming and Declaring Arrays |
Week 1 In Review |
Understanding Pointers / Week 2: |
What Is a Pointer? |
Pointers and Simple Variables |
Pointers and Variable Types |
Pointers and Arrays |
Pointer Cautions |
Array Subscript Notation and Pointers |
Passing Arrays to Functions |
Passing Pointers to Functions |
Type void Pointers |
Characters and Strings / Day 9: |
The char Data Type |
Using Character Variables |
Using Strings |
Strings and Pointers |
Strings Without Arrays |
Displaying Strings and Characters |
Reading Strings from the Keyboard |
Structures / Day 10: |
Simple Structures |
More Complex Structures |
Arrays of Structures |
Initializing Structures |
Structures and Pointers |
Unions |
Creating Synonyms for Structures with typedef |
Understanding Variable Scope / Day 11: |
What Is Scope? |
External Variables |
Local Variables |
Local Variables and the main() Function |
Which Storage Class Should You Use? |
Local Variables and Blocks |
Advanced Program Control / Day 12: |
Ending Loops Early |
The goto Statement |
Infinite Loops |
The switch Statement |
Exiting the Program |
Executing Commands from Within a Program |
Working with the Screen and Keyboard / Day 13: |
Streams and C |
C's Stream Functions |
Accepting Keyboard Input |
Screen Output |
Redirecting Input and Output |
When to Use fprintf() |
Pointers: Beyond the Basics / Day 14: |
Pointers to Pointers |
Pointers and Multidimensional Arrays |
Arrays of Pointers |
Pointers to Functions |
Functions That Return a Pointer |
Linked Lists |
Week 2 In Review |
Using Disk Files / Week 3: |
Streams and Disk Files |
Types of Disk Files |
Filenames |
Opening a File |
Writing and Reading File Data |
File Buffering: Closing and Flushing Files |
Sequential Versus Random File Access |
Detecting the End of a File |
File Management Functions |
Using Temporary Files |
Manipulating Strings / Day 16: |
String Length and Storage |
Copying Strings |
Concatenating Strings |
Comparing Strings |
Searching Strings |
String-to-Number Conversions |
Character Test Functions |
tolower() and toupper() |
Exploring the C Function Library / Day 17: |
Mathematical Functions |
Dealing with Time |
Error-Handling Functions |
Functions That Have Variable Numbers of Arguments |
Searching and Sorting |
Working with Memory / Day 18: |
Type Conversions |
Allocating Memory Storage Space |
Manipulating Memory Blocks |
Working with Bits |
Processes and Signals / Day 19: |
Processes |
Signals |
Advanced Compiler Use / Day 20: |
The C Preprocessor |
Predefined Macros |
Using Command-Line Arguments |
Command-Line Arguments Using getopt() |
Programming with Multiple Source Files |
Using Shared Libraries |
An Introduction to GUI Programming with GTK+ / Day 21: |
History |
X Concepts |
GUIs and Events |
Creating a Dialog Box |
A Simple Text Editor |
Week 3 In Review |
ASCII Character Chart / Appendix A: |
C/C++ Reserved Words / Appendix B: |
Answers / Appendix C: |
Printing Your Listings / Type and Run 1: |
The First Type and Run |
Find the Number / Type and Run 2: |
Secret Messages / Type and Run 3: |
Counting Characters / Type and Run 4: |
Calculating Mortgage Payments / Type and Run 5: |
Index |
Introduction |
Getting Started with C for Linux Programming |
This Book's Special Features |