- Shopping Bag ( 0 items )
Ships from: Aurora, IL
Usually ships in 1-2 business days
This volume provides an excellent introduction to programming, using the powerful but complicated C language. The reader learns the language through implementing the proven Koffman five-step problem solving process.
|1||Overview of Computers and Programming||1|
|1.1||Electronic Computers Then and Now||2|
|1.4||The Software Development Method||22|
|1.5||Applying the Software Development Method||25|
|2||Overview of C||33|
|2.1||C Language Elements||34|
|2.2||Variable Declarations and Data Types||41|
|2.4||General Form of a C Program||55|
|2.6||Formatting Numbers in Program Output||72|
|2.7||Interactive Mode, Batch Mode, and Data Files||76|
|2.8||Common Programming Errors||80|
|3||Top-Down Design with Functions||95|
|3.1||Building Programs from Existing Information||96|
|3.3||Top-Down Design and Structure Charts||112|
|3.4||Functions without Arguments||114|
|3.5||Functions with Input Arguments||125|
|3.6||Common Programming Errors||136|
|4||Selection Structure: if and switch Statements||145|
|4.3||The if Statement||158|
|4.4||if Statements with Compound Statements||162|
|4.5||Decision Steps in Algorithms||166|
|4.6||More Problem Solving||176|
|4.7||Nested if Statements and Multiple-Alternative Decisions||179|
|4.8||The switch Statement||190|
|4.9||Common Programming Errors||196|
|5||Repetition and Loop Statements||207|
|5.1||Repetition in Programs||208|
|5.2||Counting Loops and the while Statements||210|
|5.3||Computing a Sum or a Product in a Loop||214|
|5.4||The for Statement||220|
|5.8||The do-while Statement and Flag-Controlled Loops||248|
|5.9||Problem Solving Illustrated||252|
|5.10||How to Debug and Test Programs||257|
|5.11||Common Programming Errors||260|
|6.1||Functions with Simple Output Parameters||278|
|6.2||Multiple Calls to a Function with Input/Output Parameters||287|
|6.3||Scope of Names||293|
|6.4||Formal Output Parameters as Actual Arguments||294|
|6.5||A Program with Multiple Functions||299|
|6.6||Debugging and Testing a Program System||310|
|6.7||Common Programming Errors||313|
|7||Simple Data Types||323|
|7.1||Representation and Conversion of Numeric Types||324|
|7.2||Representation and Conversion of Type char||331|
|7.5||Common Programming Errors||350|
|8.1||Declaring and Referencing Arrays||364|
|8.3||Using for Loops for Sequential Access||370|
|8.4||Using Array Elements as Function Arguments||376|
|8.6||Searching and Sorting an Array||393|
|8.8||Array Processing Illustrated||403|
|8.9||Common Programming Errors||412|
|9.2||String Library Functions: Assignment and Substrings||432|
|9.3||Longer Strings: Concatenation and Whole-Line Input||441|
|9.5||Arrays of Pointers||449|
|9.7||String-to-Number and Number-to-String Conversions||461|
|9.8||String Processing Illustrated||468|
|9.9||Common Programming Errors||477|
|10.1||The Nature of Recursion||490|
|10.2||Tracing a Recursive Function||495|
|10.3||Recursive Mathematical Functions||503|
|10.4||Recursive Functions with Array and String Parameters||510|
|10.5||Problem Solving with Recursion||516|
|10.6||A Classic Case Study in Recursion: Towers of Hanoi||525|
|10.7||Common Programming Errors||530|
|11||Structure and Union Types||539|
|11.1||User-Defined Structure Types||540|
|11.2||Structure Type Data as Input and Output Parameters||546|
|11.3||Functions Whose Result Values Are Structured||552|
|11.4||Problem Solving with Structure Types||555|
|11.5||Parallel Arrays and Arrays of Structures||564|
|11.6||Union Types (Optional)||576|
|11.7||Common Programming Errors||583|
|12||Text and Binary File Processing||595|
|12.1||Input/Output Files: Review and Further Study||596|
|12.3||Searching a Database||614|
|12.4||Common Programming Errors||624|
|13||Programming in the Large||633|
|13.1||Using Abstraction to Manage Complexity||634|
|13.2||Personal Libraries: Header Files||637|
|13.3||Personal Libraries: Implementation Files||642|
|13.5||Modifying Functions for Inclusion in a Library||651|
|13.7||Arguments to Functions main||658|
|13.8||Defining Macros with Parameters||661|
|13.9||Common Programming Errors||666|
|14||Dynamic Data Structures||677|
|14.2||Dynamic Memory Allocation||682|
|14.4||Linked List Operators||695|
|14.5||Representing a Stock with a Linked List||701|
|14.6||Representing a Queue with a Linked List||705|
|14.9||Common Programming Errors||734|
|15||On to C++||743|
|15.1||C++ Control Structures, Input/Output, and Functions||744|
|15.2||C++ Support for Object-Oriented Programming||751|
|App. A||Character Sets|
|App. B||ANSI C Standard Libraries|
|App. C||C Operators|
|App. D||Pointer Arithmetic|
|App. E||ANSI C Reserved Words|
In preparing this edition, we have added Chapter 15, which can serve as a transition to the study of C++ in a subsequent course. We have expanded the first section of our chapter on iteration (Chapter 5) so that we introduce the full range of loops conceptually before delving into their C implementations, and we have included in Chapter 12 more extensive coverage of escape sequences and format specifiers used with printf. In addition, we have modified Chapter 14 so that it helps students consolidate their understanding of pointers as arrays, output parameters, and file accessors just prior to their exploration of the role of the pointer in dynamic memory allocation.
Two of our goals—teaching program design and teaching C—may be seen by some as contradictory. C is widely perceived as a language to be tackled only after one has learned the fundamentals of programming in some other,friendlier language. The perception that C is excessively difficult is traceable to the history of the language. Designed as a vehicle for programming the UNIX operating system, C found its original clientele among programmers who understood the complexities of the operating system and the underlying machine, and who considered it natural to exploit this knowledge in their programs. Therefore, it is not surprising that many textbooks whose primary goal is to teach C expose the student to program examples requiring an understanding of machine concepts that are not in the syllabus of a standard introductory programming course.
In this text we are able to teach both a rational approach to program development and an introduction to ANSI C because we have chosen the first goal as our primary one. One might fear that this choice would lead to a watered-down treatment of ANSI C. On the contrary, we find that the blended presentation of programming concepts and of the implementation of these concepts in C captures a focused picture of the power of ANSI. C as a high-level programming language, a picture that is often blurred in texts whose foremost objective is the coverage of all of ANSI C. Even following this approach of giving program design precedence over discussion of C language features, we have arrived at a coverage of the essential constructs of C that is quite comprehensive.
The order in which C language topics are presented is dictated by our view of the needs of the beginning programmer rather than by the structure of the C programming language. The reader may be surprised to discover drat there is no chapter entitled "Pointers." This missing chapter title follows from our treatment of C as a high-level language, not from a lack of awareness of the critical role of pointers in C.
Whereas other high-level languages have separate language constructs for output parameters and arrays, C openly folds these concepts into its notion of a pointer, drastically increasing the complexity of learning the language. We simplify the learning process by discussing pointers from these separate perspectives where such topics normally arise when teaching other programming languages, thus allowing a student to absorb the intricacies of pointer usage a little at a time. Our approach makes possible the presentation of fundamental concepts using traditional high-level language terminology—output parameter, array, array subscript, string—and makes it easier for students without prior assembly language background to master the many facets of pointer usage.
Therefore, this text has not one, but four chapters that focus on pointers. Chapter 6 discusses the use of pointers as simple output and input/output parameters, Chapter 8 deals with arrays, Chapter 9 presents strings and arrays of pointers, and Chapter 14 describes dynamic memory allocation after reviewing pointer uses previously covered. In addition, Chapters 2 and 12 discuss file pointers.
This text illustrates the importance of the C programming language by including a collection of brief articles presenting applications written in C. Included are descriptions of Vivo320, a video-conferencing tool; LINEUP, a database system for criminal mug shots; and the Borland C/C++ compiler. In addition, one article traces the history of the joint development of UNIX and C.
The book presents many aspects of software engineering. Some are explicitly discussed and others are taught only by example. The connection between good problem-solving skills and effective software development is established early in Chapter 1 with a section that discusses the art and science of problem solving. The five-phase software development method presented in Chapter 1 is used to solve the first case study and is applied uniformly to case studies throughout the text. Major program style issues are highlighted in special displays, and the coding style used in examples is based on guidelines followed in segments of the C software industry. There are sections in several chapters that discuss algorithm tracing, program debugging, and testing.
Chapter 3 introduces procedural abstraction through selected C library functions, parameterless void functions, and functions that take input parameters and return a value. Chapters 4 and 5 include additional function examples, and Chapter 6 completes the study of functions that have simple parameters. The chapter discusses the use of pointers to represent output and input/output parameters, and Chapter 7 introduces the use of a function as a parameter.
Case studies and sample programs in Chapters 6, 8, and 11 introduce by example the concepts of data abstraction and of encapsulation of a data type and operators. Chapter 13 presents C's facilities for formalizing procedural and data abstraction in personal libraries defined by separate header and implementation files. Chapter 15 introduces the concept of object-oriented design as implemented by C++.
The use of visible function interfaces is emphasized throughout the text. We do not mention the possibility of using a global variable until Chapter 13, and then we carefully describe both the dangers and the value of global variable usage.
We employ the following pedagogical features to enhance the usefulness of this book as a teaching tool:
End-of-Section Exercises. Most sections end with a number of self-check exercises. These include exercises that require analysis of program fragments as well as short programming exercises. Answers to selected self-check exercises appear at the back of the book; answers to the rest of the exercises are provided in the instructor's manual.
Examples and Case Studies. The book contains a wide variety of programming examples. Whenever possible, examples contain complete programs or functions rather than incomplete program fragments. Each chapter contains one or more substantial case studies that are solved following the software development method. Numerous case studies give the student glimpses of important applications of computing, including database searching, business applications such as billing and sales analysis, word processing, environmental applications such as radiation level monitoring and water conservation.
Syntax Display Boxes. The syntax displays describe the syntax and semantics of new C features and provide examples.
Program Style Displays. The program style displays discuss major issues of good programming style.
Error Discussions and Chapter Review. Each chapter concludes with a section that discusses common programming errors. A chapter review includes a table of new C constructs.
End-of-Chapter Exercises. A set of quick-check exercises with answers follows each Chapter Review. There are also review exercises whose solutions appear in the instructor's manual.
End-of-Chapter Projects. Each chapter ends with a set of programming projects. Answers to selected projects appear in the instructor's manual.
Appendix F describes how to use Borland C++ Builder version 5 (see below). It also describes how to use the free command-line interpreter which can be downloaded from the Borland website (www.Borland.com). A reference table of ANSI C constructs appears on the inside covers of the book, and Appendix A presents character set tables. Because this text covers only a subset of ANSI C, the remaining appendixes play an especially vital role in increasing the value of the book as a reference. Appendix B is an alphabetized table of ANSI C standard libraries. Appendix C gives a table showing the precedence and associativity of all ANSI C operators; the operators not previously defined are explained in this appendix. Throughout the book, array referencing is done with subscript notation; Appendix D is the only coverage of pointer arithmetic. Appendix E lists all ANSI C reserved words.
CD-ROM with Borland C++ Builder 5
The textbook comes with a CD-ROM that contains Borland C++ Builder 5. C++ Builder is an Integrated Development Environment for creating, debugging, and running C and C++ programs.
An on-line version of the source code figures is available at our anonymous ftp site. To access, set your ftp to ftp.awl.com. At the prompt, log in as anonymous and use your internet address as the password. From there, you change to the directory cseng/authors/hanly/cs1.3e.
The Instructor's Manual includes chapter by chapter summaries and suggestions based on selected textbook figures. These are available online. You will need to contact your sales rep for the password and access instructions.
Solutions and Test Questions
Test questions and solutions to the internal self check, review questions, and selected programming projects are available by contacting your local Addison-Wesley sales representative.
Many people participated in the development of this book. We thank especially Cindy Johnson, who developed the articles on C applications, and Paul W. Abrahams, Kenneth Pugh of Pugh-Killeen Associates, Oliver Jones of Vivo Software Inc., and Michael R. Weisert of Borland International Inc., who provided the material for these articles. We thank Joan C. Horvath of the Jet Propulsion Laboratory, California Institute of Technology, for contributing several programming exercises. We are grateful for the work of several Temple University and University of Wyoming students and former students who helped to verify the programming examples and who provided answer keys for the host of exercises. These include Mark Thoney, Lynne Doherty, Andrew Wrobel, Steve Babiak, Donna Chrupcala, Masoud Kermani, and Thayne Routh. We also thank Jeri's Computer Science Department colleagues at the University of Wyoming who have been so willing to answer her questions—Allyson Anderson, Mark Arnold, and Robin Hill.
It has been a pleasure to work with the Addison-Wesley team in this endeavor. The sponsoring editor, Susan Hartman, along with her assistant, Galia Shokry, provided much guidance and encouragement throughout all phases of manuscript revision. Patty Mahtani supervised the production of the book, while Michael Hirsch developed the marketing campaign.
Posted September 27, 2002
I think this book is the best of the best on program and design of c. I found it to be a lot better than the book that i had to buy for my programming c class, this book explained it in a much eaiser format that i could understand and learn faster. it brings you step by step thru the process of learning how to program in c, in the order that makes sense. also is has a great appendix section which has a wealth of infromation, and more than you want to know. if their is one c book that you must get; i would say you should get this one, it's very useful. and well worth the moneyWas this review helpful? Yes NoThank you for your feedback. Report this reviewThank you, this review has been flagged.