Problem Solving and Program Design in C

Jeri R. Hanly / Elliot B. Koffman
April 2009


Der Titel ist leider nicht mehr lieferbar. Sorry, This title is no longer available. Malheureusement ce titre est épuisé.



Problem Solving and Program Design in C is one of the best-selling introductory programming textbooks using the C programming language. It embraces a balanced approach to program development and an introduction to ANSI C. The book provides a gradual introduction to pointers and covers programming with functions early in the text. In later chapters, students learn to implement fundamental data structures such as lists, stacks, queues, and trees in a language that fosters their understanding of stack- and heap-dynamic memory allocation and programmer-controlled pointers. To enhance students' learning experience it offers the right amount of pedagogical features that include end-of-section and chapter exercises, examples and case studies, syntax and program style display boxes, error discussions and end-of-chapter projects.


  • Gradual introduction to pointers with a consistent emphasis on the connection between problem solving skills and effective software development.
  • Early coverage of functions, logical operators, and operators with side effects.
  • Inclusion of advanced programming topics in the “Multiprocessing Using Processes and Threads” chapter.
  • “On to C++” chapter provides an introduction to the C++ programming language.
  • End-of-section and end-of-chapter exercises, case studies and end-of-chapter projects offer practical learning opportunities at relevant points in the text.
  • A glossary provides quick access to important computing terms.
  • New to this Edition

  • New Chapter 0 explains the various fields of study in CS, as well as the career paths available to those who major in CS-related disciplines.
  • Completely revised section on Hardware in chapter 1.
  • New and revised Case Studies
  • New and revised end-of chapter programming projects
    • Table of Contents



      0.  Computer Science as a Career Path

      0.1 Why CS May be the Right Field for You

      0.2 The College Experience: Computer Disciplines and Majors from Which to Choose

      0.3 Career Opportunities


      1. Overview of Computers and Programming

      1.1 Electronic Computers Then and Now

      1.2 Computer Hardware

      1.3 Computer Software

      1.4 The Software Development Method

      1.5 Applying the Software Development Method

           Case Study: Converting Miles to Kilometers

      Chapter Review


      2. Overview of C

      2.1 C Language Elements 34

      2.2 Variable Declarations and Data Types

      2.3 Executable Statements

      2.4 General Form of a C Program

      2.5 Arithmetic Expressions

           Case Study: Supermarket Coin Processor

      2.6 Formatting Numbers in Program Output

      2.7 Interactive Mode, Batch Mode, and Data Files

      2.8 Common Programming Errors

      Chapter Review


      3. Top-Down Design with Functions

      3.1 Building Programs from Existing Information

           Case Study: Finding the Area and Circumference of a Circle

           Case Study: Computing the Weight of a Batch of Flat Washers

      3.2 Library Functions

      3.3 Top-Down Design and Structure Charts

           Case Study: Drawing Simple Diagrams

      3.4 Functions without Arguments

      3.5 Functions with Input Arguments

      3.6 Common Programming Errors

      Chapter Review


      4. Selection Structures: if and switch Statements

      4.1 Control Structures

      4.2 Conditions

      4.3 The if Statement

      4.4 if Statements with Compound Statements

      4.5 Decision Steps in Algorithms

           Case Study: Water Bill Problem

      4.6 More Problem Solving

           Case Study: Water Bill with Conservation Requirements

      4.7 Nested if Statements and Multiple-Alternative Decisions

      4.8 The switch Statement

      4.9 Common Programming Errors

      Chapter Review


      5. Repetition and Loop Statements

      5.1 Repetition in Programs

      5.2 Counting Loops and the while Statement

      5.3 Computing a Sum or a Product in a Loop

      5.4 The for Statement

      5.5 Conditional Loops

      5.6 Loop Design

      5.7 Nested Loops

      5.8 The do-while Statement and Flag-Controlled Loops

      5.9 Problem Solving Illustrated

           Case Study: Collecting Area for Solar-Heated House

      5.10 How to Debug and Test Programs

      5.11 Common Programming Errors

      Chapter Review


      6. Modular Programming

      6.1 Functions with Simple Output Parameters

      6.2 Multiple Calls to a Function with Input/Output Parameters

      6.3 Scope of Names

      6.4 Formal Output Parameters as Actual Arguments

      6.5 A Program with Multiple Functions

           Case Study: Arithmetic with Common Fractions

      6.6 Debugging and Testing a Program System

      6.7 Common Programming Errors

      Chapter Review


      7. Simple Data Types

      7.1 Representation and Conversion of Numeric Types

      7.2 Representation and Conversion of Type char

      7.3 Enumerated Types

      7.4 Iterative Approximations

           Case Study: Bisection Method for Finding Roots

      7.5 Common Programming Errors

      Chapter Review


      8. Arrays

      8.1 Declaring and Referencing Arrays

      8.2 Array Subscripts

      8.3 Using for Loops for Sequential Access

      8.4 Using Array Elements as Function Arguments

      8.5 Array Arguments

      8.6 Searching and Sorting an Array

      8.7 Multidimensional Arrays

      8.8 Array Processing Illustrated

           Case Study: Summary of Hospital Revenue

      8.9 Common Programming Errors

      Chapter Review


      9. Strings

      9.1 String Basics

      9.2 String Library Functions: Assignment and Substrings

      9.3 Longer Strings: Concatenation and Whole-Line Input

      9.4 String Comparison

      9.5 Arrays of Pointers

      9.6 Character Operations

      9.7 String-to-Number and Number-to-String Conversions

      9.8 String Processing Illustrated

           Case Study: Text Editor

      9.9 Common Programming Errors

      Chapter Review


      10. Recursion

      10.1 The Nature of Recursion

      10.2 Tracing a Recursive Function

      10.3 Recursive Mathematical Functions

      10.4 Recursive Functions with Array and String


           Case Study: Finding Capital Letters in a String

           Case Study: Recursive Selection Sort

      10.5 Problem Solving with Recursion

           Case Study: Operations on Sets

      10.6 A Classic Case Study in Recursion: Towers of Hanoi

      10.7 Common Programming Errors

      Chapter Review


      11. Structure and Union Types

      11.1 User-Defined Structure Types

      11.2 Structure Type Data as Input and Output Parameters

      11.3 Functions Whose Result Values Are Structured

      11.4 Problem Solving with Structure Types

           Case Study: A User-Defined Type for Complex Numbers

      11.5 Parallel Arrays and Arrays of Structures

           Case Study: Universal Measurement Conversion

      11.6 Union Types (Optional)

      11.7 Common Programming Errors

      Chapter Review


      12. Text and Binary File Processing

      12.1 Input/Output Files: Review and Further Study

      12.2 Binary Files

      12.3 Searching a Database

           Case Study: Database Inquiry

      12.4 Common Programming Errors

      Chapter Review


      13. Programming in the Large

      13.1 Using Abstraction to Manage Complexity

      13.2 Personal Libraries: Header Files

      13.3 Personal Libraries: Implementation Files

      13.4 Storage Classes

      13.5 Modifying Functions for Inclusion in a Library

      13.6 Conditional Compilation

      13.7 Arguments to Function main

      13.8 Defining Macros with Parameters

      13.9 Common Programming Errors

      Chapter Review


      14. Dynamic Data Structures

      14.1 Pointers

      14.2 Dynamic Memory Allocation

      14.3 Linked Lists

      14.4 Linked List Operators

      14.5 Representing a Stack with a Linked List

      14.6 Representing a Queue with a Linked List

      14.7 Ordered Lists

           Case Study: Maintaining an Ordered List of Integers

      14.8 Binary Trees

      14.9 Common Programming Errors

      Chapter Review


      15. Multiprocessing Using Processes and Threads

      15.1 Multitasking

      15.2 Processes

      15.3 Interprocess Communications and Pipes

      15.4 Threads

      15.5 Threads Illustrated

           Case Study: The Producer/Consumer Model

      15.6 Common Programming Errors

      Chapter Review


      16. On to C++

      16.1 C++ Control Structures, Input/Output, and Functions

      16.2 C++ Support for Object-Oriented Programming

      Chapter Review



      A Character Sets

      B ANSI C Standard Libraries

      C C Operators

      D More about Pointers

      E ANSI C Reserved Words







      Jeri Hanly is Emerita Lecturer in Computer Science at the University of Wyoming. She has also recently been on the faculty of the Computer Science Department at Loyola College in Maryland and Howard University.  


      Elliot Koffman is known around the world as a leader in the field of Computer Science education. Dr. Koffman is a Professor in the Computer and Information Sciences Department at Temple University. He is author or co-author of leading introductory books in most every popular language from FORTRAN through Java. He is also the recipient of the 2009 ACM-SIGCSE award for Outstanding Contribution to Computer Science Education.