| |
| |
Introduction | |
| |
| |
A Brief History of Computing | |
| |
| |
What is Computer Science? A Brief Tour of Computer Hardware | |
| |
| |
Algorithms | |
| |
| |
Programming Languages and Compilation | |
| |
| |
Programming Errors and Debugging | |
| |
| |
Software Maintenance | |
| |
| |
The Importance of Software Engineering | |
| |
| |
Some Thoughts on the C Programming Language | |
| |
| |
| |
The Basics of C Programming | |
| |
| |
Learning by Example | |
| |
| |
The “Hello World” Program | |
| |
| |
A Program to Add Two Numbers | |
| |
| |
Perspectives on the Programming Process | |
| |
| |
Data Types | |
| |
| |
Expressions | |
| |
| |
Problem Solving | |
| |
| |
Programming Idioms and Paradigms | |
| |
| |
Solving Problems on a Larger Scale | |
| |
| |
Control Statements | |
| |
| |
An Exercise in Debugging | |
| |
| |
Formatted Output | |
| |
| |
Crafting a Program | |
| |
| |
Statement Forms | |
| |
| |
Simple Statements | |
| |
| |
Control Statements | |
| |
| |
Boolean Data | |
| |
| |
The if Statement | |
| |
| |
The switch Statement | |
| |
| |
The while Statement | |
| |
| |
The for Statement | |
| |
| |
Functions | |
| |
| |
Using Library Functions | |
| |
| |
Function Declarations | |
| |
| |
Writing Your Own Functions | |
| |
| |
Mechanics of the Function-Calling Process | |
| |
| |
Procedures | |
| |
| |
Stepwise Refinement | |
| |
| |
Algorithms | |
| |
| |
Testing for Primality | |
| |
| |
Computing the Greatest Common Divisor | |
| |
| |
Numerical Algorithms | |
| |
| |
Series Expansion | |
| |
| |
Specifying the Size of Numeric Types | |
| |
| |
| |
Libraries and Modular Development | |
| |
| |
Libraries and Interfaces: A Simple Graphics Package | |
| |
| |
The Concept of an Interface | |
| |
| |
An Introduction to the Graphics Library | |
| |
| |
Building Your Own Tools | |
| |
| |
Solving a Larger Problem | |
| |
| |
Designing Interfaces: A Random Number Library | |
| |
| |
Interface Design | |
| |
| |
Generating Random Numbers by Computer | |
| |
| |
Saving Tools in Libraries | |
| |
| |
Evaluating the Design of random.h Interface | |
| |
| |
Using the Random-Number Package | |
| |
| |
Strings and Characters | |
| |
| |
The Principle of Enumeration | |
| |
| |
Characters | |
| |
| |
Strings as Abstract Data | |
| |
| |
The strlib.h Interface | |
| |
| |
Modular Development | |
| |
| |
Pig Latin—A Case Study in Modular Development | |
| |
| |
Maintaining Internal State within a Module | |
| |
| |
Implementing a Scanner Abstraction | |
| |
| |
| |
Compound Data Types | |
| |
| |
Arrays | |
| |
| |
Introduction to Arrays | |
| |
| |
Internal Representation of Data | |
| |
| |
Passing Arrays as Parameters | |
| |
| |
Using Arrays for Tabulation | |
| |
| |
Static Initialization of Arrays | |
| |
| |
Multidimensional Arrays | |
| |
| |
Searching and Sorting | |
| |
| |
Searching | |
| |
| |
Sorting | |
| |
| |
Pointers | |
| |
| |
Using Addresses as Data Values | |
| |
| |
Pointer Manipulation in C | |
| |
| |
Passing Parameters by Reference | |
| |
| |
Pointers and Arrays | |
| |
| |
Dynamic Allocation | |
| |
| |
Strings Revisited | |
| |
| |
Conceptual Representations of the Type string | |
| |
| |
The ANSI String Library | |
| |
| |
Implementing the strlib.h Library | |
| |
| |
Files | |
| |
| |
Text Files | |
| |
| |
Using Files in C | |
| |
| |
Character I/O | |
| |
| |
Line-oriented I/O | |
| |
| |
Formatted I/O | |
| |
| |
Records | |
| |
| |
The Concept of the Data Record | |
| |
| |
Using Records in C | |
| |
| |
Combining Records and Arrays | |
| |
| |
Pointers to Records | |
| |
| |
Building a Database of Records | |
| |
| |
Designing a | |