| |
| |
Preface | |
| |
| |
| |
How this Book Teaches you the Language | |
| |
| |
Characteristics of C | |
| |
| |
Why you should learn C | |
| |
| |
Programming cliches | |
| |
| |
The organization of this book | |
| |
| |
| |
How to Compile and Run a Simple Program | |
| |
| |
Compiling, linking, and executing | |
| |
| |
Statements and declarations | |
| |
| |
printf and print specifications | |
| |
| |
Case sensitivity and blank insensitivity | |
| |
| |
Operators and operands | |
| |
| |
| |
How to Declare Variables | |
| |
| |
Data types and variable declarations | |
| |
| |
Initialization and assignment | |
| |
| |
Integral data types | |
| |
| |
Comments | |
| |
| |
| |
How to Write Arithmetic Expressions | |
| |
| |
Precedence and association | |
| |
| |
Binary and unary operators | |
| |
| |
Type casting | |
| |
| |
| |
How to Write Statements that Read Information from your Keyboard | |
| |
| |
scanf and read specifications | |
| |
| |
input redirection | |
| |
| |
| |
How to Define Simple Functions | |
| |
| |
Calling and returning from functions | |
| |
| |
Arguments, parameters, and values | |
| |
| |
| |
How to Benefit from Procedure Abstraction | |
| |
| |
Making programs easier to reuse, read, and debug | |
| |
| |
Making programs easier to augment, improve, and change | |
| |
| |
| |
How to Work with Local and Global Variables | |
| |
| |
Extent and scope | |
| |
| |
Local and global variables | |
| |
| |
Macro symbols | |
| |
| |
| |
How to Perform Tests Using Numerical Predicates | |
| |
| |
Equal, ==, and not equal, !=. Greater than, >, and less than, <. Not, ! | |
| |
| |
| |
How to Write One-Way and Two-Way Conditional Statements | |
| |
| |
Boolean expressions | |
| |
| |
if and if else | |
| |
| |
Empty and compound statements | |
| |
| |
The conditional operator, ? | |
| |
| |
| |
How to Combine Boolean Expressions | |
| |
| |
And, &&, and or | |
| |
| |
Evaluation order | |
| |
| |
| |
How to Write Iteration Statements | |
| |
| |
while and for statements | |
| |
| |
Augmented assignment operators | |
| |
| |
Increment, ++, and decrement, --, operators | |
| |
| |
Side effects | |
| |
| |
| |
How to Write Iterative Filters | |
| |
| |
while reading and for reading loops | |
| |
| |
Action of the read function at the end of a file | |
| |
| |
| |
How to Write Recursive Functions | |
| |
| |
Functions that call themselves | |
| |
| |
The base Part and the recursion part. </ | |