1
2
Preface................................................................................................................................... 6
Preface to the first edition........................................................................................................8
Chapter 1 - A Tutorial Introduction.........................................................................................9
1.1 Getting Started..............................................................................................................9
1.2 Variables and Arithmetic Expressions..........................................................................11
1.3 The for statement.........................................................................................................15
1.4 Symbolic Constants......................................................................................................17
1.5 Character Input and Output.........................................................................................17
1.5.1 File Copying..........................................................................................................18
1.5.2 Character Counting...............................................................................................19
1.5.3 Line Counting.......................................................................................................20
1.5.4 Word Counting.....................................................................................................21
1.6 Arrays.........................................................................................................................23
1.7 Functions.....................................................................................................................25
1.8 Arguments - Call by Value...........................................................................................28
1.9 Character Arrays..........................................................................................................29
1.10 External Variables and Scope.....................................................................................31
Chapter 2 - Types, Operators and Expressions.......................................................................35
2.1 Variable Names............................................................................................................35
2.2 Data Types and Sizes...................................................................................................35
2.3 Constants.....................................................................................................................36
2.4 Declarations.................................................................................................................38
2.5 Arithmetic Operators...................................................................................................39
2.6 Relational and Logical Operators.................................................................................39
2.7 Type Conversions........................................................................................................40