search for books and compare prices
Tables of Contents for Problem Solving With C
Chapter/Section Title
Page #
Page Count
Preface
vi
 
Introduction
1
14
Introduction
1
1
Computer Languages
1
3
Hardware--The Parts of the Computer
4
6
Software--A Simple Program
10
5
Summary
12
3
First C Program
15
48
Introduction and Statement of the Problem
15
1
A Pseudocode Solution to Problem 1
16
2
Basic Concepts of a C Program
18
2
Declaration, Assignment, and Print Statements
20
10
The for Loop
30
5
A Better Version Of Program 1
35
3
Enrichment: Running a C Program, Software Development Cycle
38
7
More Details: Arithmetic Operations, Identifiers, for Loops
45
18
Summary
52
4
Exercises
56
7
Evaluating an Expression
63
48
Introduction and Statement of the Problem
64
1
Pseudocode for Problem 2
65
1
Writing Program 2: the if Statement
66
11
Enrichment: Creating Readable Output
77
10
Relational Operators, Compound Assignment Operators
87
3
Enrichment: Types float, double, and char; Standard Library of Functions
90
6
Enrichment: Debugging
96
15
Summary
99
2
Exercises
101
10
Reading a Set of Data
111
62
Introduction and Statement of the Problem
111
1
Pseudocode for Problem 3
112
2
The while Loop
114
4
Reading Data--scanf
118
5
Writing Program 3
123
8
Enrichment: Improving the Input/Output--Prompts and Printing
131
10
The if-else Statement and the Conditional Operator
141
32
Summary
150
3
Exercises
153
20
Summation, Stepwise Refinement, and Nested Loops
173
34
Introduction and Statement of the Problem
173
1
Pseudocode for Problem 4
174
3
Program 4 (First Version)
177
2
Enrichment: Other Versions of Program 4--Defining A Constant, Reading Data
179
5
Enrichment: Using a Nested Loop
184
8
Enrichment: Recommendations on Style; Structured Programming
192
15
Summary
197
1
Exercises
198
9
Functions
207
64
Introduction and Statement of the Problem
207
1
Function Subprograms
208
7
Programmer-Defined Functions
215
13
Program 5; Location of Functions
228
6
Void and Parameterless Functions
234
6
Enrichment: Input-Process-Output (I-P-O) Comments
240
2
Enrichment: Using Functions to Produce a Multiplication Table
242
5
Enrichment: Calls to printf and scanf: Side Effects Versus Return Values
247
3
Enrichment: A First Look at Parameters Which Are Pointers
250
21
Summary
256
4
Exercises
260
11
More on Control Structures
271
64
Introduction and Statement of the Problem
271
1
Pseudocode for Problem 6
272
3
The Main Program; Using a do-while Loop and the User-Response Method
275
6
The Function classify
281
3
The Remaining Functions
284
5
Entire Program 6
289
6
More on do-while Loops; Nested if Statement
295
9
More Control Structures: switch, break, and continue Statements; exit Function
304
8
Logical and Relational Operators, Short-Circuit Evaluation
312
23
Summary
317
2
Exercises
319
16
Arrays
335
68
Introduction and Statement of the Problem
336
1
Header (or Parameter) Values; Pseudocode for Problem 7
336
3
Program 7, Part 1
339
5
Arrays
344
11
Using an Array--Program 7, Part 1
355
4
Using Arrays with Functions---Program 7, Part 1
359
6
The Rest of Program 7
365
6
Enrichment: Analysis of Program 7: Testing and Modularity
371
3
Enrichment: Two-Dimensional Arrays
374
9
Enrichment: Detecting the End of a Data Set: EOF Method; Return Value from scanf
383
20
Summary
386
3
Exercises
389
14
Pointers
403
54
Introduction and Statement of the Problem
403
1
Pointers
403
12
Using Parameters Which Are Pointers (A Second Look)
415
11
Pointers and Arrays
426
8
Modifying Some Functions from Program 7
434
4
Program 8: Using Pointer Notation for the Arrays in Program 7
438
19
Summary
443
3
Exercises
446
11
Character Strings
457
74
Introduction and Statement of the Problem
457
1
Declaring, Initializing, Printing, and Reading Strings
458
9
String Manipulation Functions from the Standard Library
467
13
String Input/Output Functions: gets, puts
480
5
Writing Some Useful String Functions of Our Own
485
8
Program 9
493
13
Enrichment: Using Data Type char:getchar, putchar; Functions from ctype.h
506
7
Enrichment: Arrays of Strings
513
18
Summary
517
14
Sorting and Searching
531
56
Introduction and Statement of the Problem
532
1
Using a Linear or Selection Sort
532
4
Function for the Linear Sort
536
5
Enrichment: Using a Bubble Sort
541
8
Search Techniques: Linear Search
549
4
A Function to Locate a Series of Values
553
3
Pseudocode for Problem 10: Bottom-Up Approach
556
2
Program 10
558
3
Enrichment: Other Points on Sorting
561
5
Enrichment: Binary Search
566
21
Summary
573
3
Exercises
576
11
Structures
587
70
Introduction and Statement of the Problem
587
2
Pseudocode for Program 11
589
2
A New Way to Store Information: The struct Data Type
591
24
Program 11
615
18
Enrichment: Using typedef
633
2
Enrichment: Unions
635
22
Summary
640
4
Exercises
644
13
Recursion, Global Variables, Dynamic Storage Allocation, and Side Effects---a Potpourri
657
36
Introduction
657
1
Recursion
657
8
Global (External) Variables
665
6
Dynamic Storage Allocation
671
9
Side Effects of Expression Evaluation
680
13
Summary
685
2
Exercises
687
6
Appendix I ANSI C Keywords
693
1
Appendix II ASCII Codes
694
1
Appendix III C Operator Precedence Table
695
1
Appendix IV Selected Standard Library Functions
696
4
Appendix V Standard I/O Streams, Redirection, and Piping; Executing from the DOS Command Line
700
10
Appendix VI Using Files---fopen, fclose,fprintf, fscanf, Command-Line Parameters; atoi
710
17
Appendix VII File I/O Functions for Strings and Characters---fgets, fputs, fgetc, fputc
727
7
Self-Check Answers
734
15
Index
749