did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780131426443

C How to Program

by ;
  • ISBN13:

    9780131426443

  • ISBN10:

    0131426443

  • Edition: 4th
  • Format: Paperback
  • Copyright: 2004-01-01
  • Publisher: Prentice Hall
  • View Upgraded Edition
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $115.00

Summary

Highly practical in approach, this book introduces learners to the fundamental notions of structured programming and software engineering. KEY TOPICSIt covers the full C language, key library functions, object-oriented programming in C++ and Java, and event-driven GUI programming in Java. For individuals begin their mastery of C Programming.

Table of Contents

Preface xix
Introduction to Computers, the Internet and the World Wide Web
1(25)
Introduction
2(2)
What Is a Computer?
4(1)
Computer Organization
4(1)
Evolution of Operating Systems
5(1)
Personal, Distributed and Client/Server Computing
6(1)
Machine Languages, Assembly Languages and High-Level Languages
6(2)
FORTRAN, COBOL, Pascal and Ada
8(1)
History of C
8(1)
C Standard Library
9(1)
C++
10(1)
Java
10(1)
BASIC, Visual Basic, Visual C++, C# and .NET
11(1)
Key Software Trend: Object Technology
12(1)
Basics of a Typical C Program Development Environment
13(2)
Hardware Trends
15(1)
History of the Internet
16(1)
History of the World Wide Web
17(1)
General Notes About C and this Book
18(8)
Introduction to C Programming
26(30)
Introduction
27(1)
A Simple C Program: Printing a Line of Text
27(4)
Another Simple C Program: Adding Two Integers
31(5)
Memory Concepts
36(1)
Arithmetic in C
37(3)
Decision Making: Equality and Relational Operators
40(16)
Structured Program Development in C
56(44)
Introduction
57(1)
Algorithms
57(1)
Pseudocode
58(1)
Control Structures
58(2)
The if Selection Statement
60(2)
The if...else Selection Statement
62(3)
The while Repetition Statement
65(2)
Formulating Algorithms: Case Study 1 (Counter-Controlled Repetition)
67(2)
Formulating Algorithms with Top-Down, Stepwise Refinement: Case Study 2 (Sentinel-Controlled Repetition)
69(6)
Formulating Algorithms with Top-Down, Stepwise Refinement: Case Study 3 (Nested Control Structures)
75(4)
Assignment Operators
79(1)
Increment and Decrement Operators
80(20)
C Program Control
100(43)
Introduction
101(1)
Repetition Essentials
101(1)
Counter-Controlled Repetition
102(2)
for Repetition Statement
104(2)
for Statement: Notes and Observations
106(1)
Examples Using the for Statement
107(4)
Switch Multiple-Selection Statement
111(6)
do...while Repetition Statement
117(2)
break and continue Statements
119(1)
Logical Operators
120(3)
Confusing Equality (==) and Assignment (=) Operators
123(2)
Structured Programming Summary
125(18)
C Functions
143(56)
Introduction
144(1)
Program Modules in C
144(1)
Math Library Functions
145(2)
Functions
147(1)
Function Definitions
148(4)
Function Prototypes
152(2)
Headers
154(1)
Calling Functions: Call by Value and Call by Reference
155(1)
Random Number Generation
156(5)
Example: A Game of Chance
161(3)
Storage Classes
164(3)
Scope Rules
167(3)
Recursion
170(3)
Example Using Recursion: Fibonacci Series
173(4)
Recursion vs. Iteration
177(22)
C Arrays
199(59)
Introduction
200(1)
Arrays
200(2)
Defining Arrays
202(1)
Array Examples
202(14)
Passing Arrays to Functions
216(4)
Sorting Arrays
220(3)
Case Study: Computing Mean, Median and Mode Using Arrays
223(5)
Searching Arrays
228(5)
Multiple-Subscripted Arrays
233(25)
C Pointers
258(59)
Introduction
259(1)
Pointer Variable Definitions and Initialization
259(1)
Pointer Operators
260(3)
Calling Functions by Reference
263(4)
Using the const Qualifier with Pointers
267(6)
Bubble Sort Using Call-by-Reference
273(4)
Sizeof Operator
277(2)
Pointer Expressions and Pointer Arithmetic
279(2)
Relationship between Pointers and Arrays
281(5)
Arrays of Pointers
286(1)
Case Study: Card Shuffling and Dealing Simulation
286(6)
Pointers to Functions
292(25)
C Characters and Strings
317(47)
Introduction
318(1)
Fundamentals of Strings and Characters
318(2)
Character Handling Library
320(5)
String Conversion Functions
325(5)
Standard Input/Output Library Functions
330(5)
String Manipulation Functions of the String Handling Library
335(2)
Comparison Functions of the String Handling Library
337(2)
Search Functions of the String Handling Library
339(7)
Memory Functions of the String Handling Library
346(4)
Other Functions of the String Handling Library
350(14)
C Formatted Input/Output
364(29)
Introduction
365(1)
Streams
365(1)
Formatting Output with printf
365(1)
Printing Integers
366(2)
Printing Floating-Point Numbers
368(1)
Printing Strings and Characters
369(1)
Other Conversion Specifiers
370(2)
Printing with Field Widths and Precision
372(2)
Using Flags in the printf Format Control String
374(3)
Printing Literals and Escape Sequences
377(1)
Formatting Input with scanf
378(15)
C Structures, Unions, Bit Manipulations and Enumerations
393(36)
Introduction
394(1)
Structure Definitions
394(3)
Initializing Structures
397(1)
Accessing Members of Structures
397(2)
Using Structures with Functions
399(1)
typedef
399(1)
Example: High-Performance Card Shuffling and Dealing Simulation
400(3)
Unions
403(2)
Bitwise Operators
405(9)
Bit Fields
414(3)
Enumeration Constants
417(12)
C File Processing
429(37)
Introduction
430(1)
Data Hierarchy
430(2)
Files and Streams
432(1)
Creating a Sequential-Access File
433(5)
Reading Data from a Sequential-Access File
438(5)
Random-Access Files
443(1)
Creating a Random-Access File
444(2)
Writing Data Randomly to a Random-Access File
446(3)
Reading Data from a Random-Access File
449(1)
Case Study: Transaction-Processing Program
450(16)
C Data Structures
466(54)
Introduction
467(1)
Self-Referential Structures
468(1)
Dynamic Memory Allocation
468(2)
Linked Lists
470(8)
Stacks
478(6)
Queues
484(6)
Trees
490(30)
C Preprocessor
520(12)
Introduction
521(1)
#include Preprocessor Directive
521(1)
#define Preprocessor Directive: Symbolic Constants
522(1)
#define Preprocessor Directive: Macros
522(2)
Conditional Compilation
524(1)
#error and #pragma Preprocessor Directives
525(1)
# and ## Operators
525(1)
Line Numbers
526(1)
Predefined Symbolic Constants
526(1)
Assertions
527(5)
Other C Topics
532(22)
Introduction
533(1)
Redirecting Input/Output on UNIX and Windows Systems
533(1)
Variable-Length Argument Lists
534(2)
Using Command-Line Arguments
536(2)
Notes on Compiling Multiple-Source-File Programs
538(2)
Program Termination with exit and at exit
540(1)
volatile Type Qualifier
541(1)
Suffixes for Integer and Floating-Point Constants
541(1)
More on Files
542(2)
Signal Handling
544(2)
Dynamic Memory Allocation: Functions calloc and realloc
546(1)
Unconditional Branching with goto
547(7)
C++ as a ``Better C''
554(27)
Introduction
555(1)
C++
555(1)
A Simple Program: Adding Two Integers
556(2)
C++ Standard Library
558(1)
Header Files
559(2)
Inline Functions
561(2)
References and Reference Parameters
563(4)
Default Arguments and Empty Parameter Lists
567(2)
Unary Scope Resolution Operator
569(3)
Function Overloading
572(1)
Function Templates
573(8)
C++ Classes and Data Abstraction
581(46)
Introduction
582(1)
Implementing a Time Abstract Data Type with a Class
583(6)
Class Scope and Accessing Class Members
589(2)
Separating Interface from Implementation
591(4)
Controlling Access to Members
595(3)
Access Functions and Utility Functions
598(3)
Initializing Class Objects: Constructors
601(1)
Using Default Arguments with Constructors
601(4)
Using Destructors
605(1)
When Constructors and Destructors Are Called
606(3)
Using Data Members and Member Functions
609(5)
A Subtle Trap: Returning a Reference to a private Data Member
614(2)
Assignment by Default Memberwise Copy
616(2)
Software Reusability
618(9)
C++ Classes: Part II
627(40)
Introduction
628(1)
const (Constant) Objects and const Member Functions
628(8)
Composition: Objects as Members of Classes
636(6)
friend Functions and friend Classes
642(3)
Using the this Pointer
645(5)
Dynamic Memory Allocation with Operators new and delete
650(1)
static Class Members
651(6)
Data Abstraction and Information Hiding
657(3)
Example: Array Abstract Data Type
658(1)
Example: String Abstract Data Type
659(1)
Example: Queue Abstract Data Type
659(1)
Container Classes and Iterators
660(7)
C++ Operator Overloading
667(32)
Introduction
668(1)
Fundamentals of Operator Overloading
669(1)
Restrictions on Operator Overloading
670(2)
Operator Functions as Class Members vs. as friend Functions
672(1)
Overloading Stream-Insertion and Stream-Extraction Operators
673(3)
Overloading Unary Operators
676(1)
Overloading Binary Operators
676(1)
Case Study: An Array Class
677(12)
Converting between Types
689(1)
Overloading ++ and --
690(9)
C++ Inheritance
699(38)
Introduction
700(2)
Inheritance: Base Classes and Derived Classes
702(2)
Protected Members
704(1)
Casting Base-Class Pointers to Derived-Class Pointers
704(6)
Using Member Functions
710(1)
Overriding Base-Class Members in a Derived Class
710(4)
Public, Protected and Private Inheritance
714(1)
Direct Base Classes and Indirect Base Classes
715(1)
Using Constructors and Destructors in Derived Classes
716(4)
Implicit Derived-Class Object to Base-Class Object Conversion
720(1)
Software Engineering with Inheritance
721(1)
Composition vs. Inheritance
722(1)
Uses A and Knows A Relationships
722(1)
Case Study: Point, Circle, Cylinder
723(14)
C++ Virtual Functions and Polymorphism
737(23)
Introduction
738(1)
Type Fields and switch Statements
738(1)
virtual Functions
739(1)
Abstract Base Classes and Concrete Classes
740(1)
Polymorphism
740(2)
New Classes and Dynamic Binding
742(1)
Virtual Destructors
743(1)
Case Study: Inheriting Interface and Implementation
743(9)
Polymorphism, virtual Functions and Dynamic Binding ``Under the Hood''
752(8)
C++ Stream Input/Output
760(46)
Introduction
762(1)
Streams
762(3)
Iostream Library Header Files
763(1)
Stream Input/Output Classes and Objects
763(2)
Stream Output
765(4)
Stream-Insertion Operator
765(2)
Cascading Stream-Insertion/Extraction Operators
767(1)
Output of char * Variables
768(1)
Character Output with Member Function put; Cascading puts
769(1)
Stream Input
769(6)
Stream-Extraction Operator
769(3)
get and getline Member Functions
772(3)
istream Member Functions peek, putback and ignore
775(1)
Type-Safe I/O
775(1)
Unformatted I/O with read, gcount and write
775(1)
Stream Manipulators
776(5)
Integral Stream Base: dec, oct, hex and setbase
776(1)
Floating-Point Precision (precision, setprecision)
777(2)
Field Width (setw, width)
779(1)
User-Defined Manipulators
780(1)
Stream Format States
781(10)
Format State Flags
781(2)
Trailing Zeros and Decimal Points (ios: : showpoint)
783(1)
Justification (ios : : left, ios : : right, ios : : internal)
783(3)
Padding (fill, setfill)
786(1)
Integral Stream Base (ios : : dec, ios : : oct, ios : : hex, ios : : showbase)
787(1)
Floating-Point Numbers; Scientific Notation (ios : : scientific, ios : : fixed)
788(1)
Uppercase/Lowercase Control (ios : : uppercase)
789(1)
Setting and Resetting the Format Flags (flags, setiosflags, resetiosflags)
790(1)
Stream Error States
791(2)
Tying an Output Stream to an Input Stream
793(13)
C++ Templates
806(13)
Introduction
807(1)
Class Templates
807(6)
Class Templates and Nontype Parameters
813(1)
Templates and Inheritance
814(1)
Templates and friends
814(1)
Templates and static Members
815(4)
C++ Exception Handling
819(33)
Introduction
820(2)
When Exception Handling Should Be Used
822(1)
Other Error-Handling Techniques
823(1)
Basics of C++ Exception Handling: try, throw, catch
824(1)
A Simple Exception-Handling Example: Divide by Zero
824(3)
Throwing an Exception
827(1)
Catching an Exception
828(3)
Rethrowing an Exception
831(2)
Exception Specifications
833(1)
Processing Unexpected Exceptions
833(1)
Stack Unwinding
834(1)
Constructors, Destructors and Exception Handling
835(1)
Exceptions and Inheritance
836(1)
Processing new Failures
836(4)
Class auto_ptr and Dynamic Memory Allocation
840(2)
Standard Library Exception Hierarchy
842(10)
Introduction to Java Applications and Applets
852(53)
Introduction
853(1)
Basics of a Typical Java Environment
854(3)
General Notes about Java and This Book
857(1)
A Simple Program: Printing a Line of Text
858(8)
Another Java Application: Adding Integers
866(5)
Sample Applets from the Java 2 Software Development Kit
871(6)
The TicTacToe Applet
872(3)
The DrawTest Applet
875(1)
The Java2D Applet
876(1)
A Simple Java Applet: Drawing a String
877(7)
Two More Simple Applets: Drawing Strings and Lines
884(2)
Another Java Applet: Adding Integers
886(19)
Beyond C and C++: Operators, Methods and Arrays in Java
905(57)
Introduction
906(1)
Primitive Data Types and Keywords
906(2)
Logical Operators
908(5)
Method Definitions
913(5)
Java API Packages
918(4)
Random Number Generation
922(4)
Example: A Game of Chance
926(8)
Methods of Class JApplet
934(1)
Declaring and Allocating Arrays
935(1)
Examples Using Arrays
936(10)
References and Reference Parameters
946(1)
Multiple-Subscripted Arrays
946(16)
Java Object-Based Programming
962(37)
Introduction
963(1)
Implementing a Time Abstract Data Type with a Class
964(8)
Class Scope
972(1)
Creating Packages
972(4)
Initializing Class Objects: Constructors
976(1)
Using Set and Get Methods
977(7)
Using the this Reference
984(2)
Finalizers
986(1)
Static Class Members
986(13)
Java Object-Oriented Programming
999(52)
Introduction
1000(2)
Superclasses and Subclasses
1002(2)
protected Members
1004(1)
Relationship between Superclass Objects and Subclass Objects
1004(8)
Implicit Subclass-Object-to-Superclass-Object Conversion
1012(1)
Software Engineering with Inheritance
1012(1)
Composition vs. Inheritance
1013(1)
Introduction to Polymorphism
1014(1)
Type Fields and switch Statements
1014(1)
Dynamic Method Binding
1014(1)
final Methods and Classes
1015(1)
Abstract Superclasses and Concrete Classes
1015(1)
Polymorphism Example
1016(2)
New Classes and Dynamic Binding
1018(1)
Case Study: Inheriting Interface and Implementation
1019(6)
Case Study: Creating and Using Interfaces
1025(5)
Inner Class Definitions
1030(11)
Notes on Inner Class Definitions
1041(1)
Type-Wrapper Classes for Primitive Types
1041(10)
Java Graphics and Java2D
1051(41)
Introduction
1052(2)
Graphics Contexts and Graphics Objects
1054(1)
Color Control
1055(7)
Font Control
1062(6)
Drawing Lines, Rectangles and Ovals
1068(3)
Drawing Arcs
1071(3)
Drawing Polygons and Polylines
1074(3)
The Java2D API
1077(1)
Java2D Shapes
1077(15)
Java Graphical User Interface Components
1092(71)
Introduction
1093(2)
Swing Overview
1095(2)
JLabel
1097(3)
Event Handling Model
1100(2)
JTextField and JPasswordField
1102(6)
How Event Handling Works
1107(1)
JTextArea
1108(3)
JButton
1111(3)
JCheckBox
1114(3)
JComboBox
1117(3)
Mouse Event Handling
1120(4)
Layout Managers
1124(9)
FlowLayout
1125(3)
BorderLayout
1128(3)
GridLayout
1131(2)
Panels
1133(2)
Creating a Self-Contained Subclass of JPanel
1135(6)
Windows
1141(1)
Using Menus with Frames
1142(21)
Java Multimedia: Images, Animation and Audio
1163(27)
Introduction
1164(1)
Loading, Displaying and Scaling Images
1165(3)
Loading and Playing Audio Clips
1168(3)
Animating a Series of Images
1171(4)
Animation Issues
1175(2)
Customizing Applets via the HTML param Tag
1177(5)
Image Maps
1182(2)
Internet and World Wide Web Resources
1184(6)
A Internet and Web Resources
1190(7)
C/C++ Resources
1190(1)
C++ Tutorials
1191(1)
C/C++ FAQs
1191(1)
comp.lang.c++
1191(1)
C/C++ Compilers
1192(1)
Java Resources
1193(1)
Java Products
1194(1)
Java FAQs
1194(1)
Java Tutorials
1194(1)
Java Magazines
1195(1)
Java Applets
1195(1)
Multimedia
1196(1)
Java Newsgroups
1196(1)
B C99 Internet and Web Resources
1197(2)
C99 Resources
1197(2)
C Operator Precedence Charts
1199(5)
D ASCII Character Set
1204(1)
E Number Systems
1205(13)
Introduction
1206(3)
Abbreviating Binary Numbers as Octal Numbers and Hexadecimal Numbers
1209(1)
Converting Octal Numbers and Hexadecimal Numbers to Binary Numbers
1210(1)
Converting from Binary, Octal, or Hexadecimal to Decimal
1210(1)
Converting from Decimal to Binary, Octal or Hexadecimal
1211(2)
Negative Binary Numbers: Two's Complement Notation
1213(5)
C Standard Library Resources
1218(2)
C Standard Library Resources
1218(2)
Index 1220

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program