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.

9780534374822

Computer Science

by
  • ISBN13:

    9780534374822

  • ISBN10:

    0534374824

  • Format: Paperback
  • Copyright: 2000-03-03
  • Publisher: Course Technology
  • 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: $231.95

Summary

The Second Edition of this useful book presents both computer science theory and C-language syntax with a principle-before-implementation approach. Forouzan and Gilberg continue to present a clear organizational structure, supplemented by easy-to-follow figures, charts, and tables.

Table of Contents

Introduction to Computers
1(23)
Computer Systems
2(1)
Computer Hardware
2(1)
Computer Software
3(1)
System Software
3(1)
Application Software
3(1)
Computing Environments
4(2)
Personal Computing Environment
4(1)
Time-Sharing Environment
4(2)
Client/Server Environment
6(1)
Computer Languages
6(3)
Machine Languages
6(1)
Symbolic Languages
7(1)
High-Level Languages
8(1)
Natural Languages
9(1)
Writing, Editing, Compiling, And Linking Programs
9(2)
Step 1: Writing and Editing Programs
9(1)
Step 2: Compiling Programs
10(1)
Step 3: Linking Programs
10(1)
Program Execution
11(1)
System Development
11(8)
System Development Life Cycle
12(1)
Program Development
13(6)
Software Engineering and Programming Style
19(1)
Tips and Common Programming Errors
20(1)
Key Terms and Concepts
21(1)
Summary
21(1)
Practice Sets
22(2)
Review Questions
22(1)
Exercises
22(1)
Problems
23(1)
Introduction to the C Language
24(44)
Background
25(1)
C Programs
26(4)
Structure of a C Program
26(1)
A Simple Program
27(1)
Your First Program
27(1)
Comments
28(2)
Identifiers
30(1)
Types
31(5)
Void
32(1)
Integer
32(1)
Character
33(1)
Floating Point
34(1)
Logical Data
35(1)
Variables
36(3)
Variable Declaration and Definition
36(1)
Variable Initialization
37(2)
Constants
39(2)
Integer Constants
39(1)
Floating-Point Constants
39(1)
Character Constants
40(1)
String Constants
41(1)
Coding Constants
41(2)
Literal Constants
41(1)
Defined Constants
42(1)
Memory Constants
42(1)
Formatted Input/Output
43(10)
Standard Files
43(1)
Formatted Output
44(5)
Formatted Input
49(4)
Programming Examples
53(5)
Print ``Nothing!''
53(1)
Print Character Values
53(1)
Define Constants
54(1)
Print a Report
55(3)
Software Engineering and Programming Style
58(3)
Program Documentation
58(1)
Data Names
59(1)
Data Hiding
60(1)
Tips and Common Programming Errors
61(1)
Key Terms and Concepts
62(1)
Summary
63(1)
Practice Sets
63(5)
Review Questions
63(1)
Exercises
64(2)
Problems
66(1)
Projects
66(2)
Structure of A C Program
68(46)
Expressions
69(12)
Primary Expressions
70(1)
Binary Expressions
71(2)
Assignment Expressions
73(3)
Postfix Expressions
76(2)
Unary Expressions
78(3)
Precedence and Associativity
81(3)
Precedence
81(1)
Associativity
82(2)
Side Effects
84(1)
Evaluating Expressions
85(3)
Warning
88(1)
Mixed Type Expressions
88(4)
Implicit Type Conversion
89(1)
Explicit Type Conversion (Cast)
90(2)
Statements
92(4)
Expression Statements
93(2)
Compound Statements
95(1)
Statements and Defined Constants
95(1)
Sample Programs
96(10)
Example: Calculate Quotient and Remainder
96(1)
Example: Print Right Digit
97(1)
Example: Calculate Average
97(2)
Example: Degrees to Radians
99(1)
Example: Fahrenheit to Celsius
100(1)
Example: Calculate Sales Total
101(1)
Example: Calculate Student Score
102(4)
Software Engineering and Programming Style
106(2)
Kiss
106(1)
Parentheses
106(1)
User Communication
107(1)
Tips and Common Programming Errors
108(1)
Key Terms and Concepts
109(1)
Summary
109(1)
Practice Sets
110(4)
Review Questions
110(1)
Exercises
110(1)
Problems
111(1)
Projects
112(2)
Functions
114(59)
Designing Structured Programs
115(1)
Functions In C
116(3)
User-Defined Functions
119(25)
Void Functions with No Parameters
120(1)
Void Functions with Parameters
120(2)
Functions That Return Values
122(3)
Function Definition
125(2)
Prototype Declaration
127(1)
The Function Call
128(1)
Function Examples
129(8)
Parameter Passing
137(7)
Standard Library Functions
144(6)
Standard Functions for Mathematical Manipulation
145(1)
General Library Functions
146(2)
Scaling Random Numbers
148(2)
Scope
150(2)
Global Scope
151(1)
Local Scope
151(1)
A Programming Example-Calculator Program
152(2)
Software Engineering and Programming Style
154(7)
Structure Charts
154(1)
Structure Chart Rules and Symbols
154(3)
Functional Cohesion
157(2)
Top-Down Development
159(2)
Tips and Common Programming Errors
161(1)
Key Terms and Concepts3
162(1)
Summary
162(1)
Practice Sets
163(10)
Review Questions
163(1)
Exercises
164(4)
Problems
168(1)
Projects
169(4)
Selection-Making Decisions
173(56)
Logical Data and Operators
174(5)
Logical Data in C
174(1)
Logical Operators
174(1)
Evaluating Logical Expressions
175(2)
Relational Operators
177(2)
Two-Way Selection
179(15)
If...else
179(3)
Null else Statement
182(2)
Nested if Statements
184(1)
Dangling else Problem
185(1)
Simplifying if Statements
186(1)
Conditional Expressions
187(1)
Handling Major Errors
188(1)
Two-Way Selection Example
188(6)
Multiway Selection
194(9)
The switch Statement
194(7)
The else-if
201(2)
More Standard Library Functions
203(4)
Standard Characters Functions
203(2)
A Classification Program
205(2)
A Menu Program
207(6)
Software Engineering and Programming Style
213(4)
Dependent Statements
213(1)
Negative Logic
214(1)
Rules for Selection Statements
215(1)
Selection in Structure Charts
215(2)
Tips and Common Programming Errors
217(1)
Key Terms and Concepts
218(1)
Summary
218(1)
Practice Sets
219(10)
Review Questions
219(1)
Exercises
220(2)
Problems
222(1)
Projects
223(6)
Repetition
229(72)
Concept of A Loop
230(1)
Pretest and Post-Test Loops
230(2)
Initialization and Updating
232(1)
Loop Initialization
232(1)
Loop Update
233(1)
Event-Controlled and Counter-Controlled Loops
233(2)
Event-Controlled Loops
233(1)
Counter-Controlled Loops
234(1)
Loop Comparison
234(1)
Loops in C
235(14)
The while Loop
235(5)
The for Loop
240(4)
The do...while Loop
244(3)
The Comma Expression
247(2)
Loop Examples
249(11)
for Loops
249(11)
Other Statements Related to Looping
260(3)
Looping Applications
263(5)
Summation
263(1)
Product
264(1)
Smallest and Largest
265(1)
Inquiries
266(2)
Recursion
268(11)
Iterative Definition
268(1)
Recursive Definition
269(1)
Iterative Solution
269(1)
Recursive Solution
270(1)
Designing Recursive Functions
270(2)
Fibonacci Numbers
272(3)
Limitations of Recursion
275(1)
The Towers of Hanoi
275(1)
Recursive Solution of the Towers of Hanoi
275(4)
Programming Example-The Calculator Program
279(3)
Software Engineering and Programming Style
282(6)
Loops in Structure Charts
282(1)
Determining Algorithm Efficiency
283(1)
Linear Loops
283(1)
Logarithmic Loops
284(1)
Nested Loops
285(1)
Big-O Notation
286(1)
Standard Measures of Efficiency
287(1)
Tips and Common Programming Errors
288(1)
Key Terms and Concepts
289(1)
Summary
290(1)
Practice Sets
290(11)
Review Questions
290(2)
Exercises
292(2)
Problems
294(2)
Projects
296(5)
Text Files
301(49)
Concept of a File
302(1)
Files and Streams
303(3)
File Table
303(1)
Standard Files
304(1)
User Files
304(1)
File-Stream Association
305(1)
Standard Library Input/Output Functions
306(5)
File Open and Close
306(5)
Formatting Input/Output Functions
311(19)
Format Strings
311(8)
Two Common Mistakes
319(3)
Print Side Effect and Value
322(1)
File Examples
323(7)
Character Input/Output Functions
330(2)
Character Input/Output Examples
332(6)
Create Text File
332(2)
Copy Text File
334(1)
Count Characters and Lines
335(1)
Count Words in File
336(2)
Software Engineering and Programming Style
338(3)
Testing Files
338(2)
Data Terminology
340(1)
Tips and Common Programming Errors
341(2)
Key Terms and Concepts
343(1)
Summary
343(1)
Practice Sets
344(6)
Review Questions
344(1)
Exercises
345(1)
Problems
346(2)
Projects
348(2)
Arrays
350(75)
Concepts
351(2)
Using Arrays in C
353(9)
Declaration and Definition
354(1)
Accessing Elements in Arrays
354(1)
Storing Values in Arrays
355(4)
Precedence of Index Operators
359(1)
Index Range Checking
359(3)
Arrays and Functions
362(3)
Passing Individual Elements
362(1)
Passing the Whole Array
363(2)
Array Applications
365(9)
Frequency Arrays
365(1)
Histograms
366(5)
Random Number Permutations
371(3)
Sorting
374(10)
Selection Sort
374(1)
Selection Sort Algorithm
374(3)
Bubble Sort
377(1)
Bubble Sort Algorithm
378(1)
Insertion Sort
379(1)
Insertion Sort Algorithm
380(2)
Insertion Sort Reprogrammed
382(2)
Sort Conclusions
384(1)
Searching
384(7)
Sequential Search
385(2)
Binary Search
387(4)
Two-Dimensional Arrays
391(9)
Declaring and Defining Two-Dimensional Arrays
392(5)
Passing a Two-Dimensional Array to a Function
397(2)
Array Example
399(1)
Multidimensional Arrays
400(2)
Declaring and Defining Multi-Dimensional Arrays
401(1)
Programming Example-Calculate Averages
402(5)
Software Engineering and Programming Style
407(4)
Testing Sorts
407(1)
Testing Searches
407(1)
Analyzing Sort Algorithms
408(1)
Analyzing Search Algorithms
409(2)
Tips and Common Programming Errors
411(1)
Key Terms and Concepts
412(1)
Summary
412(1)
Practice Sets
413(12)
Review Questions
413(1)
Exercises
414(2)
Problems
416(3)
Projects
419(6)
Pointers
425(46)
Concepts
426(2)
Pointer Constants
426(1)
Pointer Values
427(1)
Pointer Variables
428(2)
Accessing Variables through Pointers
430(1)
The Indirection Operator
430(1)
Pointer Declaration and Definition
431(2)
Example: Print with a Pointer
432(1)
Initialization of Pointer Variables
433(6)
Example: Change Variables-Fun with Pointers
434(2)
Example: Add Two Numbers
436(1)
Example: Pointer Flexibility
437(1)
Example: Multiple Pointers for One Variable
438(1)
Pointers and Functions
439(3)
Pointers as Formal Parameters
439(2)
Functions Returning Pointers
441(1)
Pointers to Pointers
442(2)
Pointer-to-Pointer Example
443(1)
Compatibility
444(3)
Compatibility and the Void Pointer
445(1)
Casting Pointers
446(1)
Lvalue and Rvalue
447(2)
Pointer Applications
449(8)
Convert Seconds to Hours
449(1)
Quadratic Equations
450(7)
Software Engineering and Programming Style
457(4)
Quality Defined
457(1)
Quality Factors
458(2)
The Quality Circle
460(1)
Conclusion
461(1)
Tips and Common Programming Errors
461(2)
Key Terms and Concepts
463(1)
Summary
463(1)
Practice Sets
463(8)
Review Questions
463(2)
Exercises
465(3)
Problems
468(1)
Projects
469(2)
Pointer Applications
471(47)
Arrays and Pointers
472(2)
Pointer Arithmetic and Arrays
474(7)
Pointers and One-Dimensional Arrays
474(2)
Pointers and Other Operators
476(1)
Using Pointer Arithmetic
477(3)
Pointers and Two-Dimensional Arrays
480(1)
Passing an Array to a Function
481(3)
Understanding Complex Declarations
484(3)
Memory Allocation Functions
487(5)
Memory Usage
487(1)
Memory Allocation (malloc)
488(1)
Contiguous Memory Allocation (calloc)
489(1)
Reallocation of Memory (realloc)
490(1)
Releasing Memory (free)
490(2)
Array of Pointers
492(1)
Programming Applications
493(10)
Selection Sort Revisited
493(3)
Dynamic Array
496(7)
Software Engineering and Programming Style
503(2)
Pointers and Function Calls
503(1)
Pointers and Arrays
503(1)
Array Index Commutativity
503(1)
Dynamic Memory: Theory Versus Practice
504(1)
Tips and Common Programming Errors
505(1)
Key Terms and Concepts
506(1)
Summary
506(1)
Practice Sets
507(11)
Review Questions
507(1)
Exercises
508(5)
Problems
513(1)
Projects
514(4)
Strings
518(69)
String Concepts
519(1)
Fixed-Length Strings
519(1)
Variable-Length Strings
519(1)
C Strings
520(5)
Storing Strings
520(1)
The String Delimiter
521(1)
String Literals
522(1)
Strings and Characters
522(1)
Strings as Variables
523(2)
Strings and Pointers
525(1)
String Input/Output Functions
525(11)
Formatted String Input/Output
525(6)
String Input/Output
531(3)
Examples
534(2)
Arrays of Strings
536(2)
String Manipulation Functions
538(19)
String Length (strlen)
538(1)
String Copy
539(5)
String Compare
544(3)
String Concatenate
547(1)
Character in String
547(1)
String in String
548(1)
String Span
549(2)
String to Number
551(2)
String Examples
553(4)
Memory Formatting
557(9)
Scan Memory String (sscanf)
557(5)
Format Memory String (sprintf)
562(4)
A Programming Example-Morse Code
566(9)
Software Engineering and Programming Style
575(4)
Program Design Concepts
575(1)
Information Hiding
575(1)
Cohesion
575(3)
Summary
578(1)
Tips and Common Programming Errors
579(1)
Key Terms and Concepts
580(1)
Summary
580(1)
Practice Sets
581(6)
Review Questions
581(1)
Exercises
582(2)
Problems
584(1)
Projects
585(2)
Derived Types---Enumerated, Structure, and Union
587(67)
The Type Definition (typedef)
588(1)
Enumerated Types
588(4)
Enumerated Type Definition
591(1)
Structure
592(5)
Structure Declaration and Definition
593(3)
Initialization
596(1)
Accessing Structures
597(9)
Referencing Individual Fields
598(1)
Precedence of Member Operator
599(1)
Structure Operations
600(2)
Pointer to Structures
602(1)
Selection Operator
603(3)
Complex Structures
606(4)
Nested Structures
606(2)
Structures Containing Arrays
608(1)
Structure Containing Pointers
609(1)
Array of Structures
610(4)
Insertion Sort Revisited
611(3)
Structures and Functions
614(7)
Sending Individual Members
615(1)
Sending the Whole Structure
615(3)
Passing Structures through Pointers
618(3)
Unions
621(6)
Referencing Unions
622(1)
Unions in Structures
623(2)
Initializers
625(1)
Internet Addresses
626(1)
Programming Application
627(11)
Software Engineering and Programming Style
638(4)
Coupling
638(3)
Data Hiding
641(1)
Summary
641(1)
Tips and Common Programming Errors
642(1)
Key Terms and Concepts
643(1)
Summary
644(1)
Practice Sets
644(10)
Review Questions
644(1)
Exercises
645(3)
Problems
648(2)
Projects
650(4)
Binary Files
654(53)
Classification of Files
655(3)
Text Files
656(1)
Binary Files
656(2)
Using Binary Files
658(4)
State of a File
658(1)
Opening Binary Files
658(2)
Update Mode
660(2)
Closing Binary Files
662(1)
Standard Library Functions for Files
662(12)
Block Input/Output Functions
662(5)
File Status Functions
667(1)
Positioning Functions
668(3)
Block Input/Output Example: Append Files
671(2)
System File Operations
673(1)
Converting File Type
674(8)
Creating a Binary File from a Text File
674(4)
Creating a Text File from a Binary File
678(4)
File Program Examples
682(7)
Random File Accessing
682(4)
Merge Files
686(3)
Software Engineering and Programming Style
689(5)
Update Files
689(1)
Sequential File Update
689(1)
The Update Program Design
690(2)
Update Errors
692(1)
Update Structure Chart
692(1)
Update Logic
693(1)
Summary
694(1)
Tips and Common Programming Errors
694(1)
Key Terms and Concepts
695(1)
Summary
696(1)
Practice Sets
696(11)
Review Questions
696(1)
Exercises
697(5)
Problems
702(1)
Projects
703(4)
Linked Lists
707(44)
Linked List Structure
708(2)
Nodes
708(1)
Type Definition for a Linked List
709(1)
Pointers to Linked Lists
709(1)
Link List Order
710(1)
Primitive Linked List Functions
710(12)
Functional Design Approach
710(1)
Insert a Node
710(5)
Delete a Node
715(2)
Locating Data in Linked Lists
717(5)
Traversing Linked Lists
722(3)
Print Linked List
723(1)
Linked List Average
724(1)
Building A Linked List
725(7)
Build Chronological List
725(1)
Build Key-Sequenced List
726(1)
Remove a Node
727(2)
Linked List Test Driver
729(3)
Programming Examples
732(6)
Append Lists
732(3)
Array of Linked Lists
735(3)
Software Engineering and Programming Style
738(4)
Atomic and Composite Data
738(1)
Data Structure
738(1)
Abstract Data Type
739(1)
A Model for an Abstract Data Type
740(1)
ADT Data Structure
741(1)
Tips and Common Programming Errors
742(1)
Key Terms and Concepts
743(1)
Summary
743(1)
Practice Sets
743(8)
Review Questions
743(1)
Exercises
744(2)
Problems
746(2)
Projects
748(3)
Bitwise Operators
751(30)
Logical Bitwise Operators
752(5)
Shift Operators
757(3)
Bitwise Use
760(7)
Creating Masks
760(1)
Using Masks
761(5)
Rotating Bits
766(1)
Bitwise Applications
767(4)
Print Binary Revisited
767(2)
Bit Rotation
769(2)
Software Engineering and Programming Style
771(6)
Payroll Case Study
771(1)
Program Design Steps
772(1)
Structure Chart Design
772(5)
Tips and Common Programming Errors
777(1)
Key Terms and Concepts
777(1)
Summary
778(1)
Practice Sets
778(3)
Review Questions
778(1)
Exercises
778(1)
Problems
779(1)
Projects
780(1)
APPENDIX A ASCII TABLES 781(5)
A-1 ASCII Codes (Long Form)
782(3)
A-2 ASCII Table (Short Form)
785(1)
APPENDIX B RESERVED WORDS 786(1)
APPENDIX C FLOWCHARTING 787(11)
C-1 Auxiliary Symbols
788(1)
Flow Lines
788(1)
Connectors
788(1)
C-2 Primary Symbols
789(9)
Sequence
789(2)
Selection Statements
791(3)
Looping Statements
794(4)
APPENDIX D NUMBERING SYSTEMS 798(12)
D-1 Computer Numbering Systems
799(1)
Decimal Numbers
799(1)
Binary Numbers
799(1)
Octal Numbers
800(1)
Hexadecimal Numbers
800(1)
D-2 Integer Transformations
800(2)
Binary to Decimal
801(1)
Decimal to Binary
801(1)
Binary to Octal or Hexadecimal
802(1)
D-3 Storing Integers
802(7)
Unsigned Integers
803(1)
Signed Integers
804(5)
D-4 Storing Floats
809(1)
APPENDIX E STANDARD LIBRARIES 810(2)
E-1 limits.h
810(1)
E-2 float.h
811(1)
APPENDIX F FUNCTION PROTOTYPES 812(6)
F-1 Function Index
812(2)
F-2 Character Library
814(1)
F-3 Math Library
814(1)
F-4 Standard I/O Library
815(1)
General I/O
815(1)
Formatted I/O
815(1)
Character I/O
815(1)
File I/O
815(1)
String I/O
815(1)
System File Control
815(1)
F-5 Standard Library
816(1)
Math Functions
816(1)
Memory Functions
816(1)
Program Control
816(1)
System Communication
816(1)
Conversion Functions
816(1)
F-6 String Library
816(1)
Copying Data
816(1)
Comparing Data
817(1)
String Lengths
817(1)
F-7 Time
817(1)
APPENDIX G PREPROCESSOR DIRECTIVES 818(12)
G-1 File Inclusion
819(1)
G-2 Macro Definition
820(6)
Simple Commands
820(1)
Parameterized Macro
821(2)
Nested Macros
823(1)
Macro Statement Continuation
824(1)
String Command (#)
824(1)
Merge Command (##)
825(1)
Undefine Command
825(1)
G-3 Conditional Compilation
826(4)
if...else Commands
826(1)
Conditional Multiway Selection
827(1)
Excluding Code
828(1)
If Defined (ifdef/ifndef)
828(2)
APPENDIX H PROGRAM STANDARDS AND STYLES 830(5)
H-1 Global Area
831(1)
H-2 Program Main Line
832(1)
H-3 General Coding Standards
832(1)
H-4 Variables and Structures
833(1)
H-5 Function Definition
833(2)
APPENDIX I COMMAND-LINE ARGUMENTS 835(4)
I-1 Defining Command-Line Arguments
836(1)
I-2 Using Command-Line Arguments
837(2)
APPENDIX J POINTERS TO FUNCTIONS 839(4)
J-1 Defining Pointers to Functions
840(1)
J-2 Using Pointers to Functions
840(3)
APPENDIX K STORAGE CLASSES AND TYPE QUALIFIERS 843(10)
K-1 Storage Classes
844(6)
auto
844(2)
static
846(1)
extern
847(1)
Extending Visibility
847(1)
Extending Visibility to Other Files
848(2)
register
850(1)
Summary
850(1)
K-2 Type Qualifiers
850(3)
const
851(1)
Pointers and Constants
851(1)
volatile
852(1)
APPENDIX L SEPARATE COMPILATION 853(8)
L-1 Writing Separate Compilation Units
854(4)
L-2 Procedures for Separate Compilation
858(3)
Solutions 861(18)
Glossary 879(12)
Index 891

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