Problem Solving / Edition 1

Problem Solving / Edition 1

ISBN-10:
1881991482
ISBN-13:
9781881991489
Pub. Date:
01/01/1996
Publisher:
Pearson

Paperback - Rent for

Select a Purchase Option (Book and Disk)
  • purchase options

Temporarily Out of Stock Online


Overview

Problem Solving / Edition 1

This book introduces beginning programming concepts using the C language. Each chapter introduces a problem to solve, and then covers the C language constructs necessary to solve the problem. This book is for programmers who are beginners in the C language.

Product Details

ISBN-13: 9781881991489
Publisher: Pearson
Publication date: 01/01/1996
Edition description: Book and Disk
Pages: 768
Product dimensions: 7.40(w) x 9.10(h) x 1.50(d)

Table of Contents

Chapter 1 First C Program
Problem: The Squares of the Numbers from 4 to 9

Introduction and Statement of the Problem
1.1 A Pseudocode Solution to Problem 1
1.2 Basic Concepts of a C Program
1.3 Declaration, Assignment, and Print Statements
1.4 The for Loop
1.5 A Better Version of Program 1
1.6 Enrichment: Running a C Program, Software Development Cycle
1.7 More Details: Arithmetic Operations, Identifiers, for Loops
Summary
Exercises

Chapter 2 Evaluating an Expression
Problem: The Registrar's Headache

Introduction and Statement of the Problem
2.1 Pseudocode for Problem 2
2.2 Writing Program 2; The if Statement
2.3 Enrichment: Creating Readable Output
2.4 Relational Operators, Compound Assignment Operators
2.5 Enrichment: Types float, double, and char; Standard Library of Functions
2.6 Enrichment: Debugging
Summary
Exercises

Chapter 3 Reading a Set of Data
Problem: A Simple Payroll Program

Introduction and Statement of the Problem
3.1 Pseudocode for Problem 3
3.2 The while Loop
3.3 Reading Data--scanf
3.4 Writing Program 3
3.5 Enrichment: Improving the Input/Output--Prompts and Printing
3.6 The if-else Statement and the Conditional Operator
Summary
Exercises

Chapter 4 Summation, Stepwise Refinement, and Nested Loops
Problem: The Sultan's Gift: The Sum of the Squares of the Numbers
from 1 to 30

Introduction and Statement of the Problem
4.1 Pseudocode for Problem 4
4.2 Program 4 (First Version)
4.3 Enrichment: Other Versions of Program 4--Defining a Constant and Reading Data
4.4 Enrichment: Using a Nested Loop
4.5 Enrichment: Recommendations on Style; Structured Programming
Summary
Exercises

Chapter 5 Functions
Problem: Sum of Squares (Revisited)

Introduction and Statement of the Problem
5.1 Function Subprograms
5.2 Programmer-Defined Functions
5.3 Program 5; Location of Functions
5.4 Void and Parameterless Functions
5.5 Enrichment: Input-Output-Process (I-P-O) Comments
5.6 Enrichment: Using Functions to Produce a Multiplication Table
5.7 Enrichment: Calls to printf and scanf--Side Effects Versus Return Values
5.8 Enrichment: A First Look at Parameters Which are Pointers
Summary
Exercises

Chapter 6 More on Control Structures
Problem: Classifying Months and Days

Introduction and Statement of the Problem
6.1 Pseudocode for Problem 6
6.2 The Main Program; Using a do-while Loop and the User-Response Method
6.3 The Function classify
6.4 The Remaining Functions
6.5 Entire Program 6
6.6 More on do-while Loops, Nested-if Statement
6.7 Additional Control Structures: switch, break, and continue Statements; exit Function
6.8 Logical and Relational Operators, Short-Circuit Evaluation
Summary
Exercises

Chapter 7 Arrays
Problem: Averaging Sets of Numbers

Introduction and Statement of the Problem
7.1 Header (or Parameter) Values; Pseudocode for Problem 7
7.2 Program 7, Part 1
7.3 Arrays
7.4 Using an Array--Program 7, Part 1
7.5 Using Arrays with Functions--Program 7, Part 1
7.6 The Rest of Program 7
7.7 Enrichment: Analysis of Program 7: Testing and Modularity
7.8 Enrichment: Two-dimensional Arrays
7.9 Enrichment: Detecting the End of a Set of Data: EOF Method; Return Value from scanf
Summary
Exercises

Chapter 8 Pointers
Problem: Averaging Sets of Numbers, Revisited

Introduction
8.1 Pointers
8.2 Using Parameters Which Are Pointers (A Second Look)
8.3 Pointers and Arrays
8.4 Modifying Some Functions from Program 7
8.5 Program 8: Using Pointer Notation for the Arrays in Program 7
Summary
Exercises

Chapter 9 Character Strings
Problem: Preparing a Direct Mail Advertisement

Introduction and Statement of the Problem
9.1 Declaring, Initializing, Printing, and Reading Strings
9.2 String Manipulation Functions from the Standard Library
9.3 String Input/Output Functions: gets, puts
9.4 Writing Some Useful String Functions of Our Own
9.5 Program 9
9.6 Enrichment: Using Data Type char: getchar, putchar; Functions from ctype.h
9.7 Enrichment: Arrays of Strings
Summary
Exercises

Chapter 10 Sorting and Searching
Problem: Mix and Match

Introduction and Statement of the Problem
10.1 Sorting using a Linear or Selection Sort
10.2 Function for the Linear Sort
10.3 Enrichment: Using a Bubble Sort
10.4 Search Techniques: Linear Search
10.5 A Function to Locate a Series of Values
10.6 Pseudocode for Problem 10: Bottom-Up Approach
10.7 Program 10
10.8 Enrichment: Other Points on Sorting
10.9 Enrichment: Binary Search
Summary
Exercises

Chapter 11 Structures
Problem: Database of TV Quiz Show Contestants

Introduction and Statement of the Problem
11.1 Pseudocode for Program 11
11.2 A New Way to Store Information: The struct Data Type
11.3 Program 11
11.4 Enrichment: Using typedef
11.5 Enrichment: Unions
Summary
Exercises

Chapter 12 Recursion, Global Variables, Dynamic Storage Allocation,
and Side Effects–A Potpourri

Introduction
12.1 Recursive Functions
12.2 Global (External) Variables
12.3 Dynamic Storage Allocation
12.4 Side Effects of Expression Evaluation
Summary
Exercises

Appendices

I. ANSI C Keywords
II: ASCII Codes
III: C Operator Precedence Table
IV: Selected Standard Library Functions
V: Standard I/O Streams, Redirection, and Piping;
Executing from the DOS Command Line
VI: Using Files: fopen, fclose, fprintf, fscanf;
Command-Line Parameters; atoi
VII: File I/O Functions for Strings and Characters–fgets, fputs, fgetc, fputc

Answers to the Self-Checks
Index

Customer Reviews

Most Helpful Customer Reviews

See All Customer Reviews