Table of contents for Problem solving and program design in C / Jeri Hanly, Elliot B. Koffman.

Bibliographic record and links to related information available from the Library of Congress catalog.

Note: Contents data are machine generated based on pre-publication provided by the publisher. Contents may have variations from the printed book or be incomplete or contain other coding.


Counter
 
Contents
1.	Overview of Computers and Programming	1
1.1	Electronic Computers Then and Now 2
1.2	Computer Hardware 5
1.3	Computer Software 13
1.4	The Software Development Method 21
1.5	Applying the Software Development Method 25
	Case Study: Converting Miles to Kilometers 25
	Chapter Review 28
2.	Overview of C 	33
2.1	C Language Elements 34
2.2	Variable Declarations and Data Types 41
2.3	Executable Statements 45
2.4	General Form of a C Program 55
2.5	Arithmetic Expressions 58
	Case Study: Evaluating a Collection of Coins 67
2.6	Formatting Numbers in Program Output 72
2.7	Interactive Mode, Batch Mode, and Data Files 76
2.8	Common Programming Errors 80
	Chapter Review 87
3.	Top-Down Design with Functions 	95
3.1	Building Programs from Existing Information 96
	Case Study: Finding the Area and Circumference of a Circle 97
	Case Study: Computing the Weight of a Batch of Flat Washers 100
3.2	Library Functions 105
3.3	Top-Down Design and Structure Charts 112
	Case Study: Drawing Simple Diagrams 112
3.4	Functions without Arguments 114
3.5	Functions with Input Arguments 125
3.6	Common Programming Errors 136
	Chapter Review 136
4.	Selection Structures: if and switch Statements 	145
4.1	Control Structures 146
4.2	Conditions 147
4.3	The if Statement 158
4.4	if Statements with Compound Statements 162
4.5	Decision Steps in Algorithms 166
	Case Study: Water Bill Problem 166
4.6	More Problem Solving 176
	Case Study: Water Bill with Conservation Requirements 177
4.7	Nested if Statements and Multiple-Alternative 
Decisions 179
4.8	The switch Statement 190
4.9	Common Programming Errors 196
	Chapter Review 197
5.	Repetition and Loop Statements 	209
5.1	Repetition in Programs 210
5.2	Counting Loops and the while Statement 212
5.3	Computing a Sum or a Product in a Loop 216
5.4	The for Statement 222
5.5	Conditional Loops 231
5.6	Loop Design 238
5.7	Nested Loops 245
5.8	The do-while Statement and Flag-Controlled 
Loops 250
5.9	Problem Solving Illustrated 254
	Case Study: Collecting Area for Solar-Heated House 254
5.10	How to Debug and Test Programs 261
5.11	Common Programming Errors 264
	Chapter Review 266
6.	Modular Programming	279
6.1	Functions with Simple Output Parameters 280
6.2	Multiple Calls to a Function with Input/Output Parameters 289
6.3	Scope of Names 296
6.4	Formal Output Parameters as Actual Arguments 298
6.5	A Program with Multiple Functions 302
	Case Study: Arithmetic with Common Fractions 303
6.6	Debugging and Testing a Program System 312
6.7	Common Programming Errors 315
	Chapter Review 316
7.	Simple Data Types 	329
7.1	Representation and Conversion of Numeric 
Types 330
7.2	Representation and Conversion of Type char 337
7.3	Enumerated Types 340
7.4	Iterative Approximations 346
	Case Study: Bisection Method for Finding Roots 348
7.5	Common Programming Errors 356
	Chapter Review 357
8.	Arrays 	367
8.1	Declaring and Referencing Arrays 368
8.2	Array Subscripts 372
8.3	Using for Loops for Sequential Access 374
8.4	Using Array Elements as Function Arguments 380
8.5	Array Arguments 383
8.6	Searching and Sorting an Array 397
8.7	Multidimensional Arrays 402
8.8	Array Processing Illustrated 407
	Case Study: Analysis of Sales Data 408
8.9	Common Programming Errors 416
	Chapter Review 418
9.	Strings 	433
9.1	String Basics 434
9.2	String Library Functions: Assignment and 
Substrings 440
9.3	Longer Strings: Concatenation and Whole-Line 
Input 449
9.4	String Comparison 454
9.5	Arrays of Pointers 457
9.6	Character Operations 463
9.7	String-to-Number and Number-to-String 
Conversions 469
9.8	String Processing Illustrated 476
	Case Study: Text Editor 476
9.9	Common Programming Errors 485
	Chapter Review 487
10.	Recursion 	501
10.1	The Nature of Recursion 502
10.2	Tracing a Recursive Function 507
10.3	Recursive Mathematical Functions 515
10.4	Recursive Functions with Array and String 
Parameters 522
	Case Study: Finding Capital Letters in a String 522
	Case Study: Recursive Selection Sort 525
10.5	Problem Solving with Recursion 528
	Case Study: Operations on Sets 529
10.6	A Classic Case Study in Recursion: Towers 
of Hanoi 537
10.7	Common Programming Errors 543
	Chapter Review 544
11.	Structure and Union Types 	551
11.1	User-Defined Structure Types 552
11.2	Structure Type Data as Input and Output 
Parameters 558
11.3	Functions Whose Result Values Are Structured 564
11.4	Problem Solving with Structure Types 567
	Case Study: A User-Defined Type for Complex Numbers 568
11.5	Parallel Arrays and Arrays of Structures 577
	Case Study: Universal Measurement Conversion 579
11.6	Union Types (Optional) 588
11.7	Common Programming Errors 595
	Chapter Review 595
12.	Text and Binary File Processing 	609
12.1	Input/Output Files: Review and Further Study 610
12.2	Binary Files 621
12.3	Searching a Database 628
	Case Study: Database Inquiry 628
12.4	Common Programming Errors 638
	Chapter Review 639
13.	Programming in the Large 	649
13.1	Using Abstraction to Manage Complexity 650
13.2	Personal Libraries: Header Files 653
13.3	Personal Libraries: Implementation Files 658
13.4	Storage Classes 661
13.5	Modifying Functions for Inclusion in a Library 667
13.6	Conditional Compilation 670
13.7	Arguments to Function main 674
13.8	Defining Macros with Parameters 677
13.9	Common Programming Errors 682
	Chapter Review 683
14.	Dynamic Data Structures 	693
14.1	Pointers 694
14.2	Dynamic Memory Allocation 698
14.3	Linked Lists 705
14.4	Linked List Operators 711
14.5	Representing a Stack with a Linked List 717
14.6	Representing a Queue with a Linked List 721
14.7	Ordered Lists 727
	Case Study: Maintaining an Ordered List of 
Integers 728
14.8	Binary Trees 739
14.9	Common Programming Errors 750
	Chapter Review 750
15 Multiprocessing Using Processes and Threads
15.1	Multitasking	760
15.2	Processes	765
15.3	Interprocess Communicatons and Pipes	772
15.4 Threads	780
	Case Study	: Threads Illustrated	791
15.5	Common Programming Errors	803
Chapter Review	803
16.	On to C++ 	811
16.1	C++ Control Structures, Input/Output, and 
Functions 812
16.2	C++ Support for Object-Oriented Programming 815
	Chapter Review 816
Appendixes
A	Character Sets 821
B	ANSI C Standard Libraries 823
C	C Operators 825
D	More about Pointers 827
E	ANSI C Reserved Words 829
Answers	835
Glossary	861
Index	867

Library of Congress Subject Headings for this publication:

C (Computer program language).