SlideShare a Scribd company logo
C Programming Program Design Including Data
Structures 5th Edition D. S. Malik pdf download
https://ebookfinal.com/download/c-programming-program-design-
including-data-structures-5th-edition-d-s-malik/
Explore and download more ebooks or textbooks
at ebookfinal.com
Here are some recommended products for you. Click the link to
download, or explore more at ebookfinal
Java programming from problem analysis to program design
5th ed Edition D S Malik
https://ebookfinal.com/download/java-programming-from-problem-
analysis-to-program-design-5th-ed-edition-d-s-malik/
Data structures using C Second Edition Reema Thareja
https://ebookfinal.com/download/data-structures-using-c-second-
edition-reema-thareja/
Understanding Structures Analysis Materials Design 5th
Edition Derek Seward
https://ebookfinal.com/download/understanding-structures-analysis-
materials-design-5th-edition-derek-seward/
The Complete Bedwetting Book Including a Daytime Program
for Nighttime Dryness 1st Edition D. Preston
https://ebookfinal.com/download/the-complete-bedwetting-book-
including-a-daytime-program-for-nighttime-dryness-1st-edition-d-
preston/
Fundamentals of Data Structures in C 2nd Edition Ellis
Horowitz
https://ebookfinal.com/download/fundamentals-of-data-structures-
in-c-2nd-edition-ellis-horowitz/
Data Structures and Other Objects Using C 4th Edition Main
https://ebookfinal.com/download/data-structures-and-other-objects-
using-c-4th-edition-main/
Introduction to Programming Languages Programming in C C
Scheme Prolog C and SOA 5th Edition Yinong Chen
https://ebookfinal.com/download/introduction-to-programming-languages-
programming-in-c-c-scheme-prolog-c-and-soa-5th-edition-yinong-chen/
Analysis and Design of Marine Structures including CD ROM
1 Har/Cdr Edition Carlos Guedes Soares
https://ebookfinal.com/download/analysis-and-design-of-marine-
structures-including-cd-rom-1-har-cdr-edition-carlos-guedes-soares/
Classic Data Structures Samanta
https://ebookfinal.com/download/classic-data-structures-samanta/
C Programming Program Design Including Data Structures 5th Edition D. S. Malik
C Programming Program Design Including Data
Structures 5th Edition D. S. Malik Digital Instant
Download
Author(s): D. S. Malik
ISBN(s): 9780538798099, 0538798092
Edition: 5th
File Details: PDF, 20.12 MB
Year: 2010
Language: english
C Programming Program Design Including Data Structures 5th Edition D. S. Malik
C++ PROGRAMMING:
PROGRAM DESIGN INCLUDING DATA STRUCTURES
FIFTH EDITION
D.S. MALIK
Australia  Brazil  Japan  Korea  Mexico  Singapore  Spain  United Kingdom  United States
This is an electronic version of the print textbook. Due to electronic rights restrictions,
some third party content may be suppressed. Editorial review has deemed that any suppressed
content does not materially affect the overall learning experience. The publisher reserves the right
to remove content from this title at any time if subsequent rights restrictions require it. For
valuable information on pricing, previous editions, changes to current editions, and alternate
formats, please visit www.cengage.com/highered to search by ISBN#, author, title, or keyword for
materials in your areas of interest.
C++ Programming: Program Design
Including Data Structures, Fifth Edition
D.S. Malik
Executive Editor: Marie Lee
Acquisitions Editor: Amy Jollymore
Senior Product Manager: Alyssa Pratt
Editorial Assistant: Zina Kresin
Content Project Manager: Matthew
Hutchinson
Art Director: Faith Brosnan
Print Buyer: Julio Esperas
Proofreader: GreenPen QA
Indexer: Elizabeth Cunningham
Cover Designer: Roycroft Design/
www.roycroftdesign.com
Cover Photo: Contemporary Building
ª Steve Hix/Somos Images/Corbis
Compositor: Integra
ª 2011 Course Technology, Cengage Learning
ALL RIGHTS RESERVED. No part of this work
covered by the copyright herein may be
reproduced, transmitted, stored or used in any
form or by any means graphic, electronic, or
mechanical, including but not limited to
photocopying, recording, scanning, digitizing,
taping, Web distribution, information
networks, or information storage and retrieval
systems, except as permitted under Section
107 or 108 of the 1976 United States Copyright
Act, without the prior written permission of
the publisher.
For product information and technology assistance, contact us at
Cengage Learning Customer  Sales Support, 1-800-354-9706
For permission to use material from this text or product, submit
all requests online at www.cengage.com/permissions
Further permissions questions can be emailed to
permissionrequest@cengage.com
Library of Congress Control Number: 2010921540
ISBN-13: 978-0-538-79809-2
ISBN-10: 0-538-79809-2
Course Technology
20 Channel Center Street
Boston, MA 02210
USA
Some of the product names and company names used in this
book have been used for identification purposes only and may
be trademarks or registered trademarks of their respective
manufacturers and sellers.
Any fictional data related to persons or companies or URLs used
throughout this book is intended for instructional purposes only.
At the time this book was printed, any such data was fictional
and not belonging to any real persons or companies.
Course Technology, a part of Cengage Learning, reserves the
right to revise this publication and make changes from time to
time in its content without notice.
The programs in this book are for instructional purposes only.
They have been tested with care, but are not guaranteed
for any particular intent beyond educational purposes. The
author and the publisher do not offer any warranties or
representations, nor do they accept any liabilities with respect
to the programs.
Cengage Learning is a leading provider of customized
learning solutions with office locations around the globe,
including Singapore, the United Kingdom, Australia, Mexico,
Brazil and Japan. Locate your local office at:
www.cengage.com/global
Cengage Learning products are represented in Canada
by Nelson Education, Ltd.
To learn more about Course Technology, visit
www.cengage.com/coursetechnology
Purchase any of our products at your local college store or at
our preferred online store www.CengageBrain.com
TO
My Parents
Printed in the United States of America
1 2 3 4 5 6 7 16 15 14 13 12 11 10
PREFACE xxv
1. An Overview of Computers and Programming Languages 1
2. Basic Elements of C++ 27
3. Input/Output 117
4. Control Structures I (Selection) 175
5. Control Structures II (Repetition) 247
6. User-Defined Functions I 319
7. User-Defined Functions II 361
8. User-Defined Simple Data Types, Namespaces,
and the string Type 433
9. Arrays and Strings 485
10. Records (structs) 563
11. Classes and Data Abstraction 601
12. Inheritance and Composition 675
13. Pointers, Classes, Virtual Functions, Abstract Classes, and Lists 745
14. Overloading and Templates 827
15. Exception Handling 919
16. Recursion 959
17. Linked Lists 991
18. Stacks and Queues 1083
BRIEF CONTENTS
19. Searching and Sorting Algorithms 1183
20. Binary Trees 1265
21. Graphs 1321
22. Standard Template Library (STL) 1361
APPENDIX A Reserved Words 1477
APPENDIX B Operator Precedence 1479
APPENDIX C Character Sets 1481
APPENDIX D Operator Overloading 1485
APPENDIX E Additional C++ Topics 1487
APPENDIX F Header Files 1509
APPENDIX G Memory Size on a System and Random
Number Generator 1519
APPENDIX H References 1521
APPENDIX I Answers to Odd-Numbered Exercises 1523
INDEX 1555
iv | C++ Programming: Program Design Including Data Structures, Fifth Edition
TABLE OF CONTENTS
Preface xxv
AN OVERVIEW OF COMPUTERS AND PROGRAMMING
LANGUAGES 1
Introduction 2
A Brief Overview of the History of Computers 2
Elements of a Computer System 3
Hardware 4
Central Processing Unit and Main Memory 4
Input /Output Devices 5
Software 6
The Language of a Computer 6
The Evolution of Programming Languages 8
Processing a C++ Program 10
Programming with the Problem Analysis–Coding–Execution Cycle 12
Programming Methodologies 20
Structured Programming 20
Object-Oriented Programming 20
ANSI/ISO Standard C++ 22
Quick Review 22
Exercises 23
BASIC ELEMENTS OF C++ 27
A C++ Program 28
The Basics of a C++ Program 31
Comments 32
Special Symbols 32
1
2
Reserved Words (Keywords) 33
Identifiers 33
Whitespaces 34
Data Types 35
Simple Data Types 35
Floating-Point Data Types 38
Arithmetic Operators and Operator Precedence 39
Order of Precedence 43
Expressions 44
Mixed Expressions 45
Type Conversion (Casting) 47
string Type 49
Input 50
Allocating Memory with Constants and Variables 50
Putting Data into Variables 53
Assignment Statement 53
Saving and Using the Value of an Expression 56
Declaring and Initializing Variables 57
Input (Read) Statement 58
Variable Initialization 61
Increment and Decrement Operators 65
Output 67
Preprocessor Directives 75
namespace and Using cin and cout in a Program 76
Using the string Data Type in a Program 76
Creating a C++ Program 77
Debugging: Understanding and Fixing Syntax Errors 80
Program Style and Form 84
Syntax 84
Use of Blanks 85
Use of Semicolons, Brackets, and Commas 85
Semantics 85
Naming Identifiers 85
Prompt Lines 86
Documentation 87
Form and Style 87
More on Assignment Statements 89
Programming Example: Convert Length 91
vi | C++ Programming: Program Design Including Data Structures, Fifth Edition
Programming Example: Make Change 94
Quick Review 98
Exercises 100
Programming Exercises 109
INPUT/OUTPUT 117
I/O Streams and Standard I/O Devices 118
cin and the Extraction Operator  119
Using Predefined Functions in a Program 124
cin and the get Function 127
cin and the ignore Function 128
The putback and peek Functions 130
The Dot Notation between I/O Stream Variables
and I/O Functions: A Precaution 132
Input Failure 133
The clear Function 135
Output and Formatting Output 137
setprecision Manipulator 137
fixed Manipulator 138
showpoint Manipulator 139
setw 142
Additional Output Formatting Tools 144
setfill Manipulator 144
left and right Manipulators 146
Input/Output and the string Type 148
Debugging: Understanding Logic Errors
and Debugging with cout Statements 149
File Input/Output 152
Programming Example: Movie Tickets Sale and Donation to Charity 156
Programming Example: Student Grade 162
Quick Review 165
Exercises 166
Programming Exercises 170
CONTROL STRUCTURES I (SELECTION) 175
Control Structures 176
Relational Operators 177
Relational Operators and Simple Data Types 178
3
4
Table of Contents | vii
Comparing Characters 179
Relational Operators and the string Type 180
Logical (Boolean) Operators and Logical Expressions 182
Order of Precedence 184
int Data Type and Logical (Boolean) Expressions 187
bool Data Type and Logical (Boolean) Expressions 188
Selection: if and if...else 188
One-Way Selection 189
Two-Way Selection 191
Compound (Block of) Statements 195
Multiple Selections: Nested if 195
Comparing if...else Statements with a Series of if Statements 198
Short-Circuit Evaluation 199
Comparing Floating-Point Numbers for Equality: A Precaution 200
Associativity of Relational Operators: A Precaution 201
Avoiding Bugs by Avoiding Partially Understood
Concepts and Techniques 203
Input Failure and the if Statement 206
Confusion between the Equality Operator (==) and
the Assignment Operator (=) 209
Conditional Operator (?:) 211
Program Style and Form (Revisited): Indentation 211
Using Pseudocode to Develop, Test, and Debug a Program 212
switch Structures 215
Avoiding Bugs by Avoiding Partially Understood Concepts
and Techniques (Revisited) 221
Terminating a Program with the assert Function 223
Programming Example: Cable Company Billing 225
Quick Review 231
Exercises 232
Programming Exercises 241
CONTROL STRUCTURES II (REPETITION) 247
Why Is Repetition Needed? 248
while Looping (Repetition) Structure 249
Designing while Loops 251
Case 1: Counter-Controlled while Loops 252
Case 2: Sentinel-Controlled while Loops 255
5
viii | C++ Programming: Program Design Including Data Structures, Fifth Edition
Case 3: Flag-Controlled while Loops 259
Case 4: EOF-Controlled while Loops 263
eof Function 263
More on Expressions in while Statements 268
Programming Example: Fibonacci Number 269
for Looping (Repetition) Structure 273
Programming Example: Classifying Numbers 281
do...while Looping (Repetition) Structure 284
Choosing the Right Looping Structure 289
break and continue Statements 289
Nested Control Structures 291
Avoiding Bugs by Avoiding Patches 296
Debugging Loops 299
Quick Review 300
Exercises 301
Programming Exercises 313
USER-DEFINED FUNCTIONS I 319
Predefined Functions 320
User-Defined Functions 324
Value-Returning Functions 324
Syntax: Value-Returning Functions 326
Syntax: Formal Parameter List 326
Function Call 326
Syntax: Actual Parameter List 327
return Statement 327
Syntax: return Statement 327
Function Prototype 331
Syntax: Function Prototype 332
Value-Returning Functions: Some Peculiarity 333
More Examples of Value-Returning Functions 335
Flow of Execution 340
Programming Example: Largest Number 341
Programming Example: Cable Company 343
Quick Review 349
Exercises 350
Programming Exercises 356
6
Table of Contents | ix
USER-DEFINED FUNCTIONS II 361
Void Functions 362
Value Parameters 367
Reference Variables as Parameters 368
Calculate Grade 369
Value and Reference Parameters and Memory Allocation 372
Reference Parameters and Value-Returning Functions 382
Scope of an Identifier 382
Global Variables, Named Constants, and Side Effects 386
Static and Automatic Variables 391
Debugging: Using Drivers and Stubs 392
Function Overloading: An Introduction 395
Functions with Default Parameters 396
Programming Example: Classify Numbers 399
Programming Example: Data Comparison 404
Quick Review 414
Exercises 416
Programming Exercises 424
USER-DEFINED SIMPLE DATA TYPES, NAMESPACES,
AND THE string TYPE 433
Enumeration Type 434
Declaring Variables 436
Assignment 436
Operations on Enumeration Types 437
Relational Operators 437
Input /Output of Enumeration Types 438
Functions and Enumeration Types 440
Declaring Variables When Defining the Enumeration Type 442
Anonymous Data Types 442
typedef Statement 443
Programming Example: The Game of Rock, Paper, and Scissors 444
Namespaces 452
string Type 458
Additional string Operations 461
Programming Example: Pig Latin Strings 471
7
8
x | C++ Programming: Program Design Including Data Structures, Fifth Edition
Quick Review 475
Exercises 477
Programming Exercises 481
ARRAYS AND STRINGS 485
Arrays 487
Accessing Array Components 488
Processing One-Dimensional Arrays 491
Array Index Out of Bounds 494
Array Initialization During Declaration 495
Partial Initialization of Arrays During Declaration 496
Some Restrictions on Array Processing 496
Arrays as Parameters to Functions 497
Constant Arrays as Formal Parameters 498
Base Address of an Array and Array in Computer Memory 501
Functions Cannot Return a Value of the Type Array 503
Integral Data Type and Array Indices 506
Other Ways to Declare Arrays 507
Searching an Array for a Specific Item 507
C-Strings (Character Arrays) 510
String Comparison 512
Reading and Writing Strings 514
String Input 514
String Output 515
Specifying Input/Output Files at Execution Time 516
string Type and Input/Output Files 516
Parallel Arrays 517
Two- and Multidimensional Arrays 518
Accessing Array Components 520
Two-Dimensional Array Initialization During Declaration 521
Two-Dimensional Arrays and Enumeration Types 521
Initialization 524
Print 525
Input 525
Sum by Row 525
Sum by Column 526
Largest Element in Each Row and Each Column 526
Passing Two-Dimensional Arrays as Parameters to Functions 527
9
Table of Contents | xi
Arrays of Strings 530
Arrays of Strings and the string Type 530
Arrays of Strings and C-Strings (Character Arrays) 530
Another Way to Declare a Two-Dimensional Array 531
Multidimensional Arrays 532
Programming Example: Code Detection 534
Programming Example: Text Processing 540
Quick Review 547
Exercises 548
Programming Exercises 558
RECORDS (structS) 563
Records (structs) 564
Accessing struct Members 566
Assignment 568
Comparison (Relational Operators) 569
Input /Output 570
struct Variables and Functions 570
Arrays versus structs 571
Arrays in structs 572
structs in Arrays 574
structs within a struct 576
Programming Example: Sales Data Analysis 580
Quick Review 594
Exercises 594
Programming Exercises 597
CLASSES AND DATA ABSTRACTION 601
Classes 602
Unified Modeling Language Class Diagrams 606
Variable (Object) Declaration 606
Accessing Class Members 607
Built-in Operations on Classes 608
Assignment Operator and Classes 609
Class Scope 609
Functions and Classes 610
Reference Parameters and Class Objects (Variables) 610
10
11
xii | C++ Programming: Program Design Including Data Structures, Fifth Edition
Implementation of Member Functions 611
Accessor and Mutator Functions 616
Order of public and private Members of a Class 619
Constructors 621
Invoking a Constructor 623
Invoking the Default Constructor 623
Invoking a Constructor with Parameters 623
Constructors and Default Parameters 626
Classes and Constructors: A Precaution 626
Arrays of Class Objects (Variables) and Constructors 627
Destructors 629
Data Abstraction, Classes, and Abstract Data Types 630
A struct Versus a class 632
Information Hiding 633
Executable Code 637
Static Members of a Class 643
Programming Example: Candy Machine 649
Quick Review 663
Exercises 665
Programming Exercises 670
INHERITANCE AND COMPOSITION 675
Inheritance 676
Redefining (Overriding) Member Functions
of the Base Class 679
Constructors of Derived and Base Classes 686
Destructors in a Derived Class 694
Multiple Inclusions of a Header File 695
C++ Stream Classes 696
Protected Members of a Class 698
Inheritance as public, protected, or private 698
Composition (Aggregation) 702
Object-Oriented Design (OOD) and Object-Oriented Programming (OOP) 707
Identifying Classes, Objects, and Operations 709
Programming Example: Grade Report 710
Quick Review 731
Exercises 732
Programming Exercises 739
12
Table of Contents | xiii
POINTERS, CLASSES, VIRTUAL FUNCTIONS,
ABSTRACT CLASSES, AND LISTS 745
Pointer Data Type and Pointer Variables 746
Declaring Pointer Variables 746
Address of Operator () 747
Dereferencing Operator (*) 748
Classes, Structs, and Pointer Variables 752
Initializing Pointer Variables 755
Dynamic Variables 755
Operator new 756
Operator delete 757
Operations on Pointer Variables 759
Dynamic Arrays 761
Functions and Pointers 764
Pointers and Function Return Values 764
Dynamic Two-Dimensional Arrays 765
Shallow versus Deep Copy and Pointers 768
Classes and Pointers: Some Peculiarities 770
Destructor 770
Assignment Operator 772
Copy Constructor 773
Inheritance, Pointers, and Virtual Functions 780
Classes and Virtual Destructors 787
Abstract Classes and Pure Virtual Functions 787
Array Based Lists 796
Unordered Lists 803
Ordered Lists 807
Address of Operator and Classes 809
Quick Review 812
Exercises 815
Programming Exercises 822
OVERLOADING AND TEMPLATES 827
Why Operator Overloading Is Needed 828
Operator Overloading 829
Syntax for Operator Functions 830
13
14
xiv | C++ Programming: Program Design Including Data Structures, Fifth Edition
Overloading an Operator: Some Restrictions 830
Pointer this 831
Friend Functions of Classes 836
Operator Functions as Member Functions and
Nonmember Functions 839
Overloading Binary Operators 842
Overloading the Stream Insertion () and
Extraction () Operators 848
Overloading the Assignment Operator (=) 853
Overloading Unary Operators 861
Operator Overloading: Member versus Nonmember 867
Classes and Pointer Member Variables (Revisited) 868
Operator Overloading: One Final Word 868
Programming Example: Clock Type 868
Programming Example: Complex Numbers 877
Overloading the Array Index (Subscript) Operator ([]) 882
Programming Example: newString 884
Function Overloading 890
Templates 891
Function Templates 891
Class Templates 893
Array-Based Lists (Revisited) 896
Quick Review 902
Exercises 905
Programming Exercises 910
EXCEPTION HANDLING 919
Handling Exceptions within a Program 920
C++ Mechanisms of Exception Handling 924
try/catch Block 924
Using C++ Exception Classes 931
Creating Your Own Exception Classes 935
Rethrowing and Throwing an Exception 941
Exception-Handling Techniques 946
Terminate the Program 946
Fix the Error and Continue 946
Log the Error and Continue 948
15
Table of Contents | xv
Stack Unwinding 948
Quick Review 952
Exercises 954
Programming Exercises 957
RECURSION 959
Recursive Definitions 960
Direct and Indirect Recursion 963
Infinite Recursion 963
Problem Solving Using Recursion 964
Tower of Hanoi: Analysis 973
Recursion or Iteration? 974
Programming Example: Converting a Number from
Binary to Decimal 975
Programming Example: Converting a Number from
Decimal to Binary 979
Quick Review 982
Exercises 983
Programming Exercises 986
LINKED LISTS 991
Linked Lists 992
Linked Lists: Some Properties 993
Deletion 999
Building a Linked List 1000
Linked List as an ADT 1005
Structure of Linked List Nodes 1006
Member Variables of the class linkedListType 1006
Linked List Iterators 1007
Print the List 1013
Length of a List 1013
Retrieve the Data of the First Node 1014
Retrieve the Data of the Last Node 1014
Begin and End 1014
Copy the List 1015
Destructor 1016
Copy Constructor 1016
Overloading the Assignment Operator 1017
16
17
xvi | C++ Programming: Program Design Including Data Structures, Fifth Edition
Unordered Linked Lists 1017
Search the List 1018
Insert the First Node 1019
Insert the Last Node 1020
Header File of the Unordered Linked List 1025
Ordered Linked Lists 1026
Search the List 1027
Insert a Node 1028
Insert First and Insert Last 1032
Delete a Node 1033
Header File of the Ordered Linked List 1034
Print a Linked List in Reverse Order
(Recursion Revisited) 1037
printListReverse 1039
Doubly Linked Lists 1040
Default Constructor 1043
isEmptyList 1043
Destroy the List 1043
Initialize the List 1044
Length of the List 1044
Print the List 1044
Reverse Print the List 1044
Search the List 1045
First and Last Elements 1045
Circular Linked Lists 1051
Programming Example: Video Store 1052
Quick Review 1072
Exercises 1072
Programming Exercises 1077
STACKS AND QUEUES 1083
Stacks 1084
Stack Operations 1086
Implementation of Stacks as Arrays 1088
Initialize Stack 1091
Empty Stack 1092
Full Stack 1092
18
Table of Contents | xvii
Push 1092
Return the Top Element 1094
Pop 1094
Copy Stack 1096
Constructor and Destructor 1096
Copy Constructor 1097
Overloading the Assignment Operator (=) 1097
Stack Header File 1098
Programming Example: Highest GPA 1102
Linked Implementation of Stacks 1106
Default Constructor 1109
Empty Stack and Full Stack 1109
Initialize Stack 1110
Push 1110
Return the Top Element 1112
Pop 1112
Copy Stack 1114
Constructors and Destructors 1115
Overloading the Assignment Operator (=) 1115
Stack as Derived from the class
unorderedLinkedList 1118
Application of Stacks: Postfix Expressions Calculator 1119
Main Algorithm 1122
Function evaluateExpression 1122
Function evaluateOpr 1124
Function discardExp 1126
Function printResult 1126
Removing Recursion: Nonrecursive Algorithm to
Print a Linked List Backward 1129
Queues 1133
Queue Operations 1134
Implementation of Queues as Arrays 1136
Linked Implementation of Queues 1145
Queue Derived from the class
unorderedLinkedListType 1150
Application of Queues: Simulation 1151
Designing a Queuing System 1152
Customer 1153
Server 1156
xviii | C++ Programming: Program Design Including Data Structures, Fifth Edition
Discovering Diverse Content Through
Random Scribd Documents
had determined not to refuse this challenge, and,
therefore, his money was ready. Harry Broome, on
the part of his brother Johnny, who was from home,
covered the deposit, and the Thursday evening
following was named for drawing up articles, at the
“Castle,” for a further deposit, and for naming “the
novice.” Freeman and Caunt were both present, and
the crowd immense. The giant and his mentor, Ben
Caunt, arrived late, owing to an accident on the rail
near Weedon. Broome proposed to defer naming “the
novice;” but this being insisted on, or a forfeit
claimed, “William Perry, of Tipton,” was nominated as
the “great unknown,” and the following articles
“signed, sealed, and delivered”:—
“Articles of agreement entered into this 29th of September,
1842, at the Castle Tavern, Holborn, between Charles
Freeman and William Perry of Tipton. The said Charles
Freeman agrees to fight the said William Perry, a fair stand-up
fight, in a four-and-twenty foot roped ring, half minute time,
according to the New Rules, for £100 a side, on Tuesday, the
6th of December, half-way between Tipton and London. In
pursuance of this agreement, £20 a side are now deposited in
the hands of the stakeholder; a second deposit of £10 a side
to be made on Thursday, the 6th of October, at Johnny
Broome’s; a third deposit of £10 a side on Thursday, the 13th
of October, at Johnny Walker’s; a fourth deposit of £10 a side
on Thursday, the 20th of October, at Jem Burn’s; a fifth
deposit of £10 a side on Thursday, the 27th of October, at
Tom Spring’s; a sixth deposit of £10 a side on Thursday, the
3rd of November, at Johnny Broome’s; a seventh deposit of
£10 a side on Thursday, the 10th of November, at Tom
Spring’s; an eighth deposit of £10 a side on the 17th of
November, also at Tom Spring’s; and the ninth and last
deposit of £10 a side on Thursday, the 1st of December, at
Johnny Broome’s. The said deposits to be made between the
hours of 8 and 10 o’clock, p.m., or the party failing to forfeit
the money down; a toss for choice of ground to take place on
the night of the last deposit. The men to be in the ring
between the hours of twelve and one o’clock, or the man
absent to forfeit the whole of the stakes. Two umpires and a
referee to be chosen on the ground, the decision of the latter
in the event of dispute to be conclusive. In case of magisterial
interference the referee, if chosen, to name the next time and
place of meeting, or if the referee be not chosen then the
stakeholder to name the next time and place if possible on
the same day; but the money not to be given up until fairly
won or lost by a fight; the winner to pay for the ropes and
stakes. Should any money be given for the privilege of the
fight taking place in any particular locality, such money, if
agreed to be accepted, to be equally divided between the
men.
“(Signed) “Charles Freeman.
“John Broome (for W. Perry).”
Offers were made to take two to one on the
Yankee, but nothing more than six to four could be
obtained. The match excited extraordinary interest,
and set all the Americans in town on the qui vive.
They viewed the success of Freeman as a result
already almost attained.
After a round of “appearances,” “benefits,”
“soirées,” “entertainments,” c. to which the well-
advertised fact of being “matched” lent additional
attractions, both men went into training, Freeman at
Frank Key’s, the “Duke of York,” Gannick Corner, near
Barnet, and the Slasher in the first place at our friend
Jemmy Parsons’s, at Hampton, and subsequently at
Ould Tom Owen’s, at Northfleet, Kent. A
contemporary paper thus announces the coming
event on the previous Saturday:—
“Freeman has been assiduously attended by
his friend Ben Caunt, and has been ranging up
hill and down dale like the celebrated giant Gog,
in his ‘seven-league boots,’ with staff in hand
and followed by ‘a tail,’ which, from the length
of his fork, generally keeps a respectful distance
in his rear. Although his nob has been roofed
with a shallow tile, to diminish the appearance
of his steeple-like proportions, he still has the
appearance of a walking monument, to the no
small alarm of the squirrels in Squire Byng’s
park, into whose dormitories he occasionally
casts a squint of recognition. By his good
humour and playfulness of disposition he has
won all hearts, and has been a welcome guest
on whatever premises he has cast anchor in his
walks, which have seldom been less than
twenty or thirty miles a day. He has been
extremely attentive to his training, and has
been much reduced in flesh, while his muscular
developments stand forth with additional
symmetry. On his arrival in this country he
carried some twenty-three stone ‘good meat,’
but we doubt whether on Tuesday he will much
exceed eighteen stone. His drawers and fighting
shoes have been built with a due regard to ease
and elegance, and the latter have been
seasonably aired by being lent to a cat and
kittens as temporary nurseries. He already
sports his blue bird’s-eye fogle, and, without
vaunt or unseemly bounce, seems to think his
chances of success are planted on a good
foundation.
“The Slasher has been under the care of
Johnny Broome, whose brother is constantly
with him, and was removed on Tuesday, for
some reason not explained, from Hampton to
Northfleet. We have not seen him, but he is
described as in fine condition, and in high
spirits. He will weigh, we hear, between thirteen
and fourteen stone, stands six feet high, and is
a well-proportioned, muscular fellow (always
deducting the ‘baker-knee,’ which destroys the
perpendicular of his pedestal). His flag of cream
colour ground, with the union-jack in the
centre, bearing the words ‘Old England,’ and the
rose, the thistle, and the shamrock in the
corner, the whole inclosed in a blue border, has
been unfurled at Johnny Broome’s, and has
found numerous supporters on the usual terms,
‘a sovereign or nothing.’ The betting within the
last week has varied; in some places the Slasher
has been taken for choice, in others Freeman
has been the favourite at 5 to 4, at which price
a good deal of business has been done. The
final deposit was made at Johnny Broome’s, in
Air Street, Piccadilly, on Thursday evening, in
the presence of a goodly muster. Neither of the
men was present. Betting was slack, 5 to 4 only
being offered on Freeman; but after some
breathing a ‘supposed green,’ offered 30 to 10
on the Giant, at which Johnny Broome snapped,
as well as 20 to 10 immediately after from the
same innocent, who said he had £50 to lay out
and was satisfied with a small profit. This,
however, did not advance Freeman much in the
betting, for, after a good deal of ‘screwing,’
higher odds than 6 to 4, and this reluctantly,
could not be obtained. In consequence of a
private agreement between the backers of both
men, the appointed toss for choice of ground
did not take place.”
There had long been a complaint in the Fancy
circles of the dearth of “great men;” if “great” be
synonymous with “big,” then this was a “great fight.”
How far it deserved that epithet the reader will
shortly be able to decide. The Slasher had never
been credited with scientific qualifications, and “the
American Giant” was remarkable solely for his
prodigious bulk and weight-lifting pretensions, never
having fought a prize battle before. The match, we
are inclined to think, arose rather from a desire to
put the pretensions of “the Yankee critter” to the test
than from any belief that a man could be found
capable of successfully competing with such “a
mountain of humanity;” the more especially as Ben
Caunt, the Champion of England, had signified that
he and Freeman were sworn friends, and were,
therefore, unlikely to come in hostile collision. Johnny
Broome was consulted as to whether he could find a
man willing to try his hand with the Giant, and he at
once answered in the affirmative, experience having
afforded him opportunities of estimating the game
and muscular qualities of the Slasher, who was
perfectly willing to make the experiment. It was
under these circumstances the challenge was given
and accepted. This was the position in which matters
stood when the match was made, and in due course
the men went into training, each taking every pains
to improve his stamina and physical qualities. We
may here remark that, in the opinion of competent
judges, the mere fact of Freeman being so much
taller and heavier than his opponent was not
regarded as an argument in favour of his real
superiority. In truth, we have seen, and over and
over again been led to believe, that a man standing
six feet high, and weighing between twelve and
thirteen stone, with muscular power and activity in
proportion, is the beau ideal of manly perfection; and
that anything beyond this is mere surplusage,
seldom, if ever, of any real advantage, as has been
remarked of most of the giants who have been
exhibited as objects of curiosity. We must admit,
however, that for his size, we never saw a man so
symmetrical in all respects as Freeman; there was
nothing unwieldy or awkward in his appearance. In
point of muscular development and strength, too, we
are persuaded there was not his equal, and in point
of activity and lightness, and springiness of action, he
was not less to be admired; in fact, his early career
was in the equestrian school, where, among other
feats, he rode two horses at once, at the same time
balancing a man with his arms above his head as he
galloped round the circus, added to which he was
renowned for the number of somersaults he could
throw in succession. In lifting weights, too, on more
occasions than one, he has raised fifteen cwt. from
the ground. With all these appliances, however, there
yet might be a want of animal courage and natural
powers of enduring punishment and fatigue; and in
the absence of any criterion upon which an opinion
on these latter points could be formed, considerable
doubts were entertained of the probable issue of his
battle with the Slasher, who was known to possess
fearless intrepidity, great bodily strength, some
science, and sufficient height and weight to entitle
himself to be ranked among the most dangerous of
our modern millers. Hence the betting, which seldom
exceeded 5 to 4 in favour of Freeman, did not prove
him to have inspired any extraordinary confidence in
the minds of his friends, of whom, from his really
unassuming conduct, civil deportment, and good
temper, he had many.
We may here state that the wisdom of not
ascribing too much merit to superior bulk derived
confirmation from scientific calculations made by Mr.
Hutchinson, a surgeon of eminence, who made some
curious experiments by means of hydraulic and other
instruments to ascertain the constitutional powers of
human beings, founded on comparisons of the
strength of their lungs, by respiration and inspiration,
the state of their pulse, capacity of chest, height,
weight, c. Mr. Hutchinson submitted both Freeman
and Perry to his tests, and the result of his
observation was, that although Freeman’s
admeasurement was extraordinary in every respect,
yet, comparatively, when the dimensions of both men
were taken into account, the balance of bodily power,
strength, and endurance was in favour of Perry, who
Mr. Hutchinson considered more calculated to sustain
fatigue and punishment than his gigantic antagonist.
Mr. Hutchinson, of course, admitted that the
inference which he thus drew may be defeated by
accidental or other causes; but looking to the mere
animal qualities of the men, such was his conclusion.
That his hypothesis was fairly tried cannot be
asserted, for, as will be seen, both men left off, so far
as we were capable of judging from the darkness
which prevailed, pretty much on a par, whether as
respects punishment or fatigue.
It will be borne in mind that at the making of the
last deposit, the toss for choice of ground was
dispensed with, Spring, on the part of Freeman, and
Broome, on the part of Perry, having determined on
the probable locality. It was felt desirable to preserve
the secret as long as possible, and it was not till
Monday that the direction was generally known,
when a trip by the Eastern Counties Railway to the
borders of Hertfordshire and Essex was announced,
with an intimation that a simultaneous departure by
the half-past nine o’clock train to Sawbridgeworth
(about seven and twenty miles from London) would
suit all purposes, and prevent any unnecessary bustle
at the immediate scene of action. Notwithstanding
the secrecy which had been observed, however,
some few “go-carts” with their motley inmates were
seen going down the road the night before, and thus
a hint was given, of which the police took advantage;
and hence, being on the alert, the attendance of a
magistrate was obtained, and much trouble and
inconvenience, as the sequel will show, were
experienced. In the interim both men arrived in town
at their respective head-quarters, Freeman at Tom
Spring’s, and Perry at Johnny Broome’s, so as to be
ready for their morning start, and both houses were
crowded to excess.
With the dawn all were in motion, and by eight
o’clock the London terminus of the chosen railway
was besieged by visitors. Many of these brought
drags, which were placed upon the trucks, while
others trusted to the “chapter of accidents,” which
proved to have a very wide range, for the means of
conveyance. Among the first arrivals were the Tipton
Slasher and his friends, who thus took time by the
forelock, so as to be near the point of rendezvous in
due season. This division agreed to alight at Harlow
station, as the train did not pull up at
Sawbridgeworth, which was, however, but two miles
further, within convenient toddling distance, and
thither all proceeded. On reaching the fixture a
damper was thrown on the prospects of the
travellers. The superintendent of police was found at
his post. He had received orders from London to
prevent hostilities, and to this was added the fact
that Mr. Phillips, a Hertfordshire magistrate, was in
readiness to “keep the peace.” In this unpleasant
dilemma all waited till the arrival of the half-past nine
o’clock train, in which came Freeman, Tom Spring,
Caunt, and a vast accession of the Fancy. Fortunately
there was a carriage and four horses waiting the
arrival of Freeman, and after a short deliberation it
was resolved to move on to Hatfield Heath, about
four miles further, in the county of Essex, and the
“office” being given, away all went in that direction—​
the great proportion on their ten toes, for
conveyances were out of the question—​
and the roads
being heavy the pilgrimage was far from agreeable,
especially to “the London particulars,” who were
unprepared for such a journey. For this unexpected
tax upon their patience there was no remedy, and on
they went till the desired goal was reached. On the
road there were some few mishaps, but still all were
cheered on by hope. The Commissary lost no time in
examining the intended field of battle, which he
found swampy, and far from desirable; but there was
no help for it, and he was about to form a ring when
a fresh alarm was given. The Sawbridgeworth police
superintendent and Mr. Phillips, the magistrate, once
more presented their ill-omened countenances, and
plainly declared their determination to prevent the
fight taking place either in Essex or Hertfordshire
This was a poser. A council of war was held—​
suggestions of all sorts were offered, and a great
deal of time was lost. Cambridgeshire, the adjoining
county, was deemed too distant to be reached in
time, and more especially by the pedestrians; and at
last it was determined to “try back,” and return
towards London; Broxbourne, on the borders of
Middlesex and Essex, being agreed on as the point of
re-assemblage.
This point settled, a general move took place
towards the nearest stations—​
the toddlers to
Sawbridgeworth, and the charioteers to Bishop
Stortford, there to repack their nags and drags, while
the beak and his co-partner, considering that a move
had been made to get out of their bailiwick, also
moved off. On reaching Bishop Stortford a fresh
resolution was formed. “While the cat’s away the
mice will play;” so, as the conservators of propriety
were no longer present, it was urged that the ring
might be formed in the place originally intended, half
a mile from the Sawbridgeworth station, not far from
the same field in which Turner beat Scroggins, in
June, 1817, and scarcely more distant from the scene
of Oliver’s conquest over Shelton, in 1820. No sooner
said than done; and, in the absence of those who
had promised to avoid the county of Hertford, at half-
past two o’clock all agreed to drop down to the place
from whence they came, with the exception of the
Commissary, Freeman, and his friends, who took the
main road in a carriage kindly yielded to them by the
Right Rev. the Bishop of Bond Street, who also
hospitably furnished their larders with a very
welcome supply of roast fowls and other
“combustibles,” of which their “inward men” stood
beseechingly in need. In the interim the Slasher
threw himself on a bed at Bishop Stortford, and all
who had wisdom took some hasty refreshment. On
again reaching Sawbridgeworth we were informed
that the lists were formed, and a competent guide
being found, all set out along the towing-path of the
canal to a very eligible site, about half a mile off, on
an elevated piece of ground admirably calculated for
the purpose. The evening was now fast approaching,
for it was nearly four o’clock, and it was hoped there
would be still daylight sufficient to decide which was
the better man. The privilege tickets were
distributed, and in a short time everything was
arranged for the commencement of hostilities.
All being in readiness, Freeman entered the ring in
high spirits, attended by Caunt and King Dick, and
was received with loud cheers. Rumours were now
afloat that the Slasher did not mean to come, and
sovereigns even were offered to be laid that there
would be no fight. In the interim horsemen were sent
off to Sawbridgeworth station to urge the approach
of the missing man, who it was known had been left
there in charge of Broome. Matters thus remained in
doubt for some time, and great impatience began to
be manifested, when it was announced, to the great
joy of the spectators, that the Slasher was coming—​
and come at last he did, amidst the encouraging
shouts of his friends. He lost no time in entering the
ring, and was immediately met with a friendly shake
of the mauley by Freeman. The Slasher was attended
by Ben Terry and a provincial friend named Tom
Parker. No time was now lost in “trimming” the men
for battle, and their superfluous “feathers” were
quickly removed. Both appeared in high spirits and
eager for business. Umpires and a referee having
been chosen, the ring was cleared out, and the
“privileged” dropped contentedly on the damp earth,
with such preservatives to their sitting places as
circumstances would permit; but it must be
acknowledged that these were far from satisfactory,
owing to the difficulties to which the Commissary had
been exposed in the various transfers of his materiel.
On being stripped and placed in juxtaposition, the
towering height of Freeman presented a most
formidable aspect, while the muscular development
of every limb, and the broad expanse of his chest
and shoulders, gave him the appearance of herculean
strength. His weight, without his clothes, we
understood was but little above seventeen stone, for
it was remarked that during the last week of his
training he rather diminished than increased in bulk.
Still, he was in high spirits, and moved about with
elastic and graceful step. In the following July he
would be 23 years of age. The Slasher also wore a
cheerful smile on his mug, which betrayed the fact
that he had already lost some of his head rails. From
his hips up his bust displayed great muscular power,
but being in-kneed, there was less of symmetry in his
figure than in Freeman’s. On throwing himself into
position, however, this was scarcely perceptible, and
he may be described as a model of burly strength.
He appeared to be, and said he was, in excellent
condition, and, judging from his cheerful index, there
was no want of self-confidence. His height six feet,
his age twenty-three, and his weight 13st. 4lb.; but
notwithstanding the fearful odds against him, he
evidently regarded the coming struggle with gallant
indifference. Of betting there was but little—​
5 to 3
was offered but not taken, and the only bet we heard
laid was one of 6 to 4 on Freeman.
THE FIGHT.
Round 1.—​
Precisely at seven minutes after four o’clock the
men were conducted to the scratch, their fogles having been
first tied to the corner stake, and having shaken hand with
great good humour, the seconds retired to their corners. The
towering height and gigantic proportions of Freeman led all to
suppose that he would endeavour to fight down his opponent;
but, as will be seen, this anticipation was not fulfilled. The
Slasher stood on the defensive and Freeman broke ground,
hitting out with his left; from this the Slasher retreated, when
Freeman followed him quickly, popped in his left and right
slightly, and the Slasher was down. Freeman laughing, and no
mischief done.
2.—​
The Slasher again to the scratch, when Freeman led off
left and right; the latter blow got well home, and dropped the
Slasher. First knock-down blow for Freeman; but no damage
done, as the Slasher received it when retreating.
3.—​
The Slasher made play, and tried his left on Freeman’s
body, but was stopped. Freeman rushed to him, the Slasher
retiring and hitting short and wild. Freeman popped in his left
and right, caught the Slasher in his arms, and threw him with
ease.
4.—​
The Slasher, on the defensive system, dodged a little,
delivered his left on the ribs, in getting away he fell, and thus
escaped Freeman’s return.
5.—​
Freeman hit out left and right, but the Slasher ducked
his head and fell on his knees.
6.—​
The Slasher on the dodging system, stepped back;
Freeman after him to the corner, where there was a wild rally,
in which hits right and left were exchanged. The Slasher got
within Freeman’s long arms, gave him a tidy smack with his
right on the left eye, and got down. (First blood from
Freeman’s brow, and the Tipton lads uproarious.)
7.—​
The Slasher, the first to fight, hit out left and right, but
was stopped. Freeman slashed away left and right but without
precision, and after some trifling deliveries the Slasher got
down.
8.—​
The Slasher popped in his left on Freeman’s ribs, and
got away; Freeman after him, when the Slasher closed.
Freeman lifted him clean off the ground, but was unable to
get his arm loose to fib, and after a short struggle the Slasher
slipped from his grasp and got down.
9.—​
The Slasher again led off with his left at the body, and
in getting away fell from accident or design. [Cries of “foul”
and “foul” was claimed on the part of Freeman; but the
referee did not feel himself justified in stopping the fight, and
“time” was called.]
10.—​
The Slasher again tried the artful dodge, rushed in to
hit with the left at the body; but Freeman seized him in his
powerful feelers, held him up for a short time, and finding he
could do nothing at in-fighting fell on him, but not so as to do
him any mischief.
11.—​
The Slasher as lively as a grig popped in his left on
Freeman’s arm and got away; Freeman followed, gave him
one, two, left and right The Slasher broke from him, and
delivered his right on his shoulder; then getting away, fell to
avoid.
12.—​
The Slasher once more led off with his left, but was
short. Freeman after him delivered left and right; the Slasher
down.
13.—​
Freeman popped in his left, The Slasher retreated and
fell.
14.—​
Freeman again planted his left slightly. The Slasher
adhered to his retiring system. Freeman followed him to the
ropes, and after a scrambling exchange of hits the Slasher got
down. Freeman pointing at him derisively with his finger and
laughing.
15.—​
Freeman hit left and right, and the Slasher rushed in
and caught him round the body, to try for the fall; Freeman
held him up completely off the ground by the neck, then
chopped first with the left and then with the right; the Slasher
hit up left and right, and caught Freeman on the mouth with
his right; and after a short struggle was thrown, Freeman on
him.
16.—​
The Slasher again tried his left at the body, but was
short, the blow falling slightly on Freeman’s arm. Exchange of
blows. Freeman with the left on the nob, and Slasher on the
shoulder with the right, which sounded, but was of no effect.
Slasher, in retreating, fell.
17.—​
Slasher came up on the defensive, but Freeman hit
him down with his left.
18.—​
Slasher again popped his left at the body, but was hit
down with a counter-hit from Freeman’s left. Freeman fell on
him, and foul was claimed by Slasher’s party, but not
acknowledged, as it was obvious the fall was accidental.
19.—​
Slasher hit Freeman on the shoulder with his right,
and in return caught it left and right as he retreated. Slasher
returned to the charge with his right, and fell.
20.—​
A wild exchange of blows, but not effective, and the
Slasher slipped down in retreating.
21.—​
[Twenty-three minutes had now elapsed, no real
damage done on either side, and both as fresh as when they
commenced.] The Slasher popped in his left on the body, and
stepped back; Freeman after him, hit left and right, and the
Slasher fell.
22.—​
Freeman delivered left and right; the Slasher was
short in his return, and again received two pops left and right,
and fell.
23.—​
Freeman delivered left and right, and Slasher down.
24.—​
Freeman led off with his left. The Slasher popped in
his left on the mark and tried to drop, but Freeman caught
him round the neck and held him up some time, and then let
him fall, tumbling over him. (Another claim of foul not
allowed.)
25.—​
Freeman popped in his right on Slasher’s left eye; the
Slasher countered on his shoulder, when Freeman caught him
with his left, and the Slasher was down.
26.—​
Freeman again planted his left; and, on Slasher
rushing in, caught him in his arms, held him for a second or
two, and fell on him.
27.—​
Freeman popped in his left, and dropped his man with
his right.
28.—​
The Slasher hit short with his left, and renewed the
dodging system, playing round his man. Freeman tried to nail
him, but he got away, hit out with his left at the body, and fell
without a return. [Another claim of foul for Freeman, not
admitted.]
29.—​
Slasher hit at the body with his left and broke away,
Freeman after him, all for mischief, caught him on the hop,
and hit him down with his right.
30.—​
The Slasher delivered his right on Freeman’s shoulder,
broke away, and tried it with the left on the body, but was
stopped. Freeman let go left and right, but the Slasher ducked
his nob, escaped, and fell.
31.—​
The Slasher again in with his left on the ribs and
away; Freeman after him, caught him on the pimple, and he
fell.
32.—​
The Slasher hit short left and right, and was hit down
with Freeman’s left.
33.—​
The Slasher pursued his left-handed game at the
body, but, in getting away, was hit down with a touch from
Freeman’s left.
34.—​
The Slasher missed left and right, caught it left and
right, and was down.
35.—​
[It now became so dark that it was difficult to see
what was doing in the ring, and the spectators came closer to
the ropes. The partisans of the Slasher were extremely
uproarious, and one of them especially was constantly
interfering with the umpires, called “time” when it was not
time, and was guilty of other most offensive and unfair
conduct.] The Slasher, as usual, led off with his left at the
body, but without effect, and in return was hit down.
36.—​
The Slasher hit short with his left, and was hit down
by a counter from Freeman’s left as he was getting away.
37.—​
Slasher planted his favourite body blow with the left,
but without producing any visible effect; Freeman did not
seem to feel it, and he was again down.
38.—​
Trifling exchanges with the left, and the Slasher down.
39.—​
The Slasher rushed in to make another effort for the
throw, but Freeman again seized him in his powerful grasp,
fibbed, and fell with him, but not on him.
40, 41, 42, 43, 44.—​
Slasher down in every round, but
apparently no mischief done, and as far as the glimpse of light
left would permit, we could discover no distinct mark of
punishment on either man.
45.—​
The Slasher delivered his left at the body and fell, as if
from the force of his own blow. Freeman fell over him, but
evidently with a desire to avoid falling on him. [Another
appeal was made to the referee on the ground of the Slasher
falling without a blow, but the referee declared it was
impossible to form a correct opinion, and expressed a strong
wish that the fight should either be drawn or adjourned, but
to this neither party would accede.]
46, 47, and 48.—​
The Slasher down in each round, and
Freeman manfully avoiding falling on him.
49.—​
The Slasher in with his left on the body, but as he
attempted to retreat Freeman caught him in his arms, held
him for some time, occasionally chopping, and at last fell
forward on him, but too much over to produce any
consequence.
50.—​
The Slasher showed some fatigue, but came up full of
confidence. He delivered his left at the body, but did not get
well home; Freeman caught him left and right, and he went
down to avoid further mementoes.
To describe the remaining rounds would be an idle attempt,
in fact it became so dark that the men were only visible from
the light colour of their skins and drawers. The Slasher
pursued his dodging, getting away, and falling system,
occasionally making his left and right hits at the body and
shoulder, and sometimes appearing to recoil from the effects
of his own blows, but without producing any turn in his
favour. Freeman hitting left and right, and now and then
seizing his man, lifting him up, and flinging him down, but
almost invariably avoiding falling on him; in one instance
actually making an arch over his carcase, his head and legs on
the ground, amidst the acclamations of the throng. In the last
few rounds there was an evident attempt to draw Freeman
into the Slasher’s corner, round which a desperate set of
ruffians had collected, who, by the most offensive
vociferations, endeavoured to intimidate and alarm him. He,
however, kept his temper, and came up every round cool and
collected, grumbling only at the Slasher not standing up to
fight. In the 69th round the Slasher exclaimed, “I’ve got you
now, old fellow!” but the words were scarcely out of his
mouth when Freeman hit him down with his left. The
darkness, combined with a fog, now became so intense that it
was impossible to see what was doing from one side of the
ring to the other. The referee declared his utter inability to
form any judgment of the character of the fight, and, unable
to get both umpires to agree on the expediency of putting an
end to the battle, he jumped into the ring, and, getting
between the men, declared he would not permit them to
prolong the contest. At this moment both men were fresh and
vigorous, and each seemed disinclined to leave his chance of
victory in doubt, Slasher especially, who said he considered he
was robbed of the fight, while Freeman laughed, and said, if
they were permitted to proceed, the result would perhaps
prove he was mistaken. The referee was, however,
peremptory, and both men were taken from the ring after
having fought seventy rounds in one hour and twenty-four
minutes. They walked away as fresh as when they began,
with a mutual desire that they might renew the combat the
next day at twelve o’clock, at such place as the referee might
appoint, to which the latter assented, as there did not appear
to be anything in their appearance to justify a further delay in
the gratification of their desires.
Remarks.—​
It is much to be regretted that this curious
encounter was not brought to a more satisfactory conclusion,
inasmuch as the merits of the men still remain undecided;
and so evenly had their pretensions been balanced in the
minds of their respective friends that each party declares, had
time and circumstances permitted, their favourite must have
been crowned with victory. How far these conclusions may be
well or ill founded we will not pretend to say; but certainly we
feel justified in giving to both men an equal proportion of
praise, so far at least as their game qualities are concerned. It
is true, we may be disposed to take exception to the “getting
down” system which was adopted by the Slasher, but then it
must be borne in mind he fought at fearful odds both as
regards weight and length, and could never hope successfully
to compete with such an antagonist unless by a degree of
caution and cunning, which with a man of his own inches
would have been unjustifiable and amounted to cowardice.
There is no doubt that occasionally his dropping after
delivering his blows had too much the appearance of being at
variance with our notion of “a fair stand-up fight;” but then
the ground was slippery, and he asserts that when he did fall
it was from the recoil of his own blows or from his being
unable to keep his feet in endeavouring to avoid the
tremendous return which he had sufficient reason to expect.
That this was provoking to Freeman we can well imagine; but,
under all the circumstances, we do not think it detracts from
the game qualities of the Slasher, who certainly came up from
first to last undismayed, and with a manly determination to
win if he could. Of his scientific qualifications we cannot say
much. If he possessed any they were reserved for a future
occasion. He never attempted to stop the blows which were
showered on his canister, and throughout confined himself to
attempts to disable Freeman by body blows from his left or
round hits with his right. The former occasionally reached
their destination with sounding effect, but we are inclined to
believe they fell more frequently on Freeman’s arm, which
was dropped to catch them, than upon his more vulnerable
corpus. That some of them might have got home we are
inclined to believe, but it was clear they did not produce any
serious consequence, for on examining the Giant’s body
subsequently we were surprised to find so few symptoms of
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!
ebookfinal.com

More Related Content

Similar to C Programming Program Design Including Data Structures 5th Edition D. S. Malik (20)

PDF
C programming from problem analysis to program design 4th ed Edition D S Malik
hlepsabaah
 
PDF
C programming from problem analysis to program design 4th ed Edition D S Malik
sueguekelti
 
PDF
00 C++ For Engineers and Scientists.pdf
KirubelWondwoson1
 
PDF
Programmingwithc 131017034813-phpapp01
Getachew Ganfur
 
PDF
Starting out with C from control structures through objects Eighth Edition To...
chridimhere
 
PDF
Starting out with C from control structures through objects Eighth Edition To...
sanasymiddei
 
PDF
Starting out with C from control structures through objects Eighth Edition To...
rsjhvvmvz3985
 
PPT
01 introduction to cpp
Manzoor ALam
 
PDF
C++ for beginners......masters 2007
Informatics and Maths
 
PDF
Tailieu.vncty.com c++ for beginners......masters 2007
Trần Đức Anh
 
PDF
C++ for beginners......masters 2007
Informatics and Maths
 
PDF
(eBook PDF) Starting Out with C++: Early Objects 9th Edition
xltatno
 
PDF
Computer Programming With C Kunal Pimparkhede
namotoanipe
 
PDF
Starting out with C from control structures through objects Eighth Edition To...
hatleezzatcs
 
PDF
Starting out with C from control structures through objects Eighth Edition To...
hatleezzatcs
 
PPT
C++ Programming : from problem analysis to program design
ArderjhadeOrlanda
 
PDF
C++ Programming From Problem Analysis to Program Design 8th Edition Malik Sol...
uswlipoli5
 
PDF
C++ Programming From Problem Analysis to Program Design 8th Edition Malik Sol...
tolenjirikey
 
PDF
Solutions manual for c++ programming from problem analysis to program design ...
Warren0989
 
PDF
C++ Programming From Problem Analysis to Program Design 8th Edition Malik Sol...
daveykdotela7
 
C programming from problem analysis to program design 4th ed Edition D S Malik
hlepsabaah
 
C programming from problem analysis to program design 4th ed Edition D S Malik
sueguekelti
 
00 C++ For Engineers and Scientists.pdf
KirubelWondwoson1
 
Programmingwithc 131017034813-phpapp01
Getachew Ganfur
 
Starting out with C from control structures through objects Eighth Edition To...
chridimhere
 
Starting out with C from control structures through objects Eighth Edition To...
sanasymiddei
 
Starting out with C from control structures through objects Eighth Edition To...
rsjhvvmvz3985
 
01 introduction to cpp
Manzoor ALam
 
C++ for beginners......masters 2007
Informatics and Maths
 
Tailieu.vncty.com c++ for beginners......masters 2007
Trần Đức Anh
 
C++ for beginners......masters 2007
Informatics and Maths
 
(eBook PDF) Starting Out with C++: Early Objects 9th Edition
xltatno
 
Computer Programming With C Kunal Pimparkhede
namotoanipe
 
Starting out with C from control structures through objects Eighth Edition To...
hatleezzatcs
 
Starting out with C from control structures through objects Eighth Edition To...
hatleezzatcs
 
C++ Programming : from problem analysis to program design
ArderjhadeOrlanda
 
C++ Programming From Problem Analysis to Program Design 8th Edition Malik Sol...
uswlipoli5
 
C++ Programming From Problem Analysis to Program Design 8th Edition Malik Sol...
tolenjirikey
 
Solutions manual for c++ programming from problem analysis to program design ...
Warren0989
 
C++ Programming From Problem Analysis to Program Design 8th Edition Malik Sol...
daveykdotela7
 

Recently uploaded (20)

PDF
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
PDF
SSHS-2025-PKLP_Quarter-1-Dr.-Kerby-Alvarez.pdf
AishahSangcopan1
 
PPTX
THE TAME BIRD AND THE FREE BIRD.pptxxxxx
MarcChristianNicolas
 
PDF
IMP NAAC REFORMS 2024 - 10 Attributes.pdf
BHARTIWADEKAR
 
PPTX
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
PDF
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
PPSX
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
PDF
Zoology (Animal Physiology) practical Manual
raviralanaresh2
 
PPTX
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PDF
CHILD RIGHTS AND PROTECTION QUESTION BANK
Dr Raja Mohammed T
 
PDF
The Different Types of Non-Experimental Research
Thelma Villaflores
 
PPTX
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
PDF
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
PPTX
Views on Education of Indian Thinkers J.Krishnamurthy..pptx
ShrutiMahanta1
 
PDF
People & Earth's Ecosystem -Lesson 2: People & Population
marvinnbustamante1
 
PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PPTX
Mathematics 5 - Time Measurement: Time Zone
menchreo
 
PDF
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
PPTX
PPT on the Development of Education in the Victorian England
Beena E S
 
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
SSHS-2025-PKLP_Quarter-1-Dr.-Kerby-Alvarez.pdf
AishahSangcopan1
 
THE TAME BIRD AND THE FREE BIRD.pptxxxxx
MarcChristianNicolas
 
IMP NAAC REFORMS 2024 - 10 Attributes.pdf
BHARTIWADEKAR
 
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
Zoology (Animal Physiology) practical Manual
raviralanaresh2
 
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
CHILD RIGHTS AND PROTECTION QUESTION BANK
Dr Raja Mohammed T
 
The Different Types of Non-Experimental Research
Thelma Villaflores
 
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
Views on Education of Indian Thinkers J.Krishnamurthy..pptx
ShrutiMahanta1
 
People & Earth's Ecosystem -Lesson 2: People & Population
marvinnbustamante1
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
Mathematics 5 - Time Measurement: Time Zone
menchreo
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
PPT on the Development of Education in the Victorian England
Beena E S
 
Ad

C Programming Program Design Including Data Structures 5th Edition D. S. Malik

  • 1. C Programming Program Design Including Data Structures 5th Edition D. S. Malik pdf download https://ebookfinal.com/download/c-programming-program-design- including-data-structures-5th-edition-d-s-malik/ Explore and download more ebooks or textbooks at ebookfinal.com
  • 2. Here are some recommended products for you. Click the link to download, or explore more at ebookfinal Java programming from problem analysis to program design 5th ed Edition D S Malik https://ebookfinal.com/download/java-programming-from-problem- analysis-to-program-design-5th-ed-edition-d-s-malik/ Data structures using C Second Edition Reema Thareja https://ebookfinal.com/download/data-structures-using-c-second- edition-reema-thareja/ Understanding Structures Analysis Materials Design 5th Edition Derek Seward https://ebookfinal.com/download/understanding-structures-analysis- materials-design-5th-edition-derek-seward/ The Complete Bedwetting Book Including a Daytime Program for Nighttime Dryness 1st Edition D. Preston https://ebookfinal.com/download/the-complete-bedwetting-book- including-a-daytime-program-for-nighttime-dryness-1st-edition-d- preston/
  • 3. Fundamentals of Data Structures in C 2nd Edition Ellis Horowitz https://ebookfinal.com/download/fundamentals-of-data-structures- in-c-2nd-edition-ellis-horowitz/ Data Structures and Other Objects Using C 4th Edition Main https://ebookfinal.com/download/data-structures-and-other-objects- using-c-4th-edition-main/ Introduction to Programming Languages Programming in C C Scheme Prolog C and SOA 5th Edition Yinong Chen https://ebookfinal.com/download/introduction-to-programming-languages- programming-in-c-c-scheme-prolog-c-and-soa-5th-edition-yinong-chen/ Analysis and Design of Marine Structures including CD ROM 1 Har/Cdr Edition Carlos Guedes Soares https://ebookfinal.com/download/analysis-and-design-of-marine- structures-including-cd-rom-1-har-cdr-edition-carlos-guedes-soares/ Classic Data Structures Samanta https://ebookfinal.com/download/classic-data-structures-samanta/
  • 5. C Programming Program Design Including Data Structures 5th Edition D. S. Malik Digital Instant Download Author(s): D. S. Malik ISBN(s): 9780538798099, 0538798092 Edition: 5th File Details: PDF, 20.12 MB Year: 2010 Language: english
  • 7. C++ PROGRAMMING: PROGRAM DESIGN INCLUDING DATA STRUCTURES FIFTH EDITION D.S. MALIK Australia Brazil Japan Korea Mexico Singapore Spain United Kingdom United States
  • 8. This is an electronic version of the print textbook. Due to electronic rights restrictions, some third party content may be suppressed. Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. The publisher reserves the right to remove content from this title at any time if subsequent rights restrictions require it. For valuable information on pricing, previous editions, changes to current editions, and alternate formats, please visit www.cengage.com/highered to search by ISBN#, author, title, or keyword for materials in your areas of interest.
  • 9. C++ Programming: Program Design Including Data Structures, Fifth Edition D.S. Malik Executive Editor: Marie Lee Acquisitions Editor: Amy Jollymore Senior Product Manager: Alyssa Pratt Editorial Assistant: Zina Kresin Content Project Manager: Matthew Hutchinson Art Director: Faith Brosnan Print Buyer: Julio Esperas Proofreader: GreenPen QA Indexer: Elizabeth Cunningham Cover Designer: Roycroft Design/ www.roycroftdesign.com Cover Photo: Contemporary Building ª Steve Hix/Somos Images/Corbis Compositor: Integra ª 2011 Course Technology, Cengage Learning ALL RIGHTS RESERVED. No part of this work covered by the copyright herein may be reproduced, transmitted, stored or used in any form or by any means graphic, electronic, or mechanical, including but not limited to photocopying, recording, scanning, digitizing, taping, Web distribution, information networks, or information storage and retrieval systems, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without the prior written permission of the publisher. For product information and technology assistance, contact us at Cengage Learning Customer Sales Support, 1-800-354-9706 For permission to use material from this text or product, submit all requests online at www.cengage.com/permissions Further permissions questions can be emailed to [email protected] Library of Congress Control Number: 2010921540 ISBN-13: 978-0-538-79809-2 ISBN-10: 0-538-79809-2 Course Technology 20 Channel Center Street Boston, MA 02210 USA Some of the product names and company names used in this book have been used for identification purposes only and may be trademarks or registered trademarks of their respective manufacturers and sellers. Any fictional data related to persons or companies or URLs used throughout this book is intended for instructional purposes only. At the time this book was printed, any such data was fictional and not belonging to any real persons or companies. Course Technology, a part of Cengage Learning, reserves the right to revise this publication and make changes from time to time in its content without notice. The programs in this book are for instructional purposes only. They have been tested with care, but are not guaranteed for any particular intent beyond educational purposes. The author and the publisher do not offer any warranties or representations, nor do they accept any liabilities with respect to the programs. Cengage Learning is a leading provider of customized learning solutions with office locations around the globe, including Singapore, the United Kingdom, Australia, Mexico, Brazil and Japan. Locate your local office at: www.cengage.com/global Cengage Learning products are represented in Canada by Nelson Education, Ltd. To learn more about Course Technology, visit www.cengage.com/coursetechnology Purchase any of our products at your local college store or at our preferred online store www.CengageBrain.com TO My Parents Printed in the United States of America 1 2 3 4 5 6 7 16 15 14 13 12 11 10
  • 10. PREFACE xxv 1. An Overview of Computers and Programming Languages 1 2. Basic Elements of C++ 27 3. Input/Output 117 4. Control Structures I (Selection) 175 5. Control Structures II (Repetition) 247 6. User-Defined Functions I 319 7. User-Defined Functions II 361 8. User-Defined Simple Data Types, Namespaces, and the string Type 433 9. Arrays and Strings 485 10. Records (structs) 563 11. Classes and Data Abstraction 601 12. Inheritance and Composition 675 13. Pointers, Classes, Virtual Functions, Abstract Classes, and Lists 745 14. Overloading and Templates 827 15. Exception Handling 919 16. Recursion 959 17. Linked Lists 991 18. Stacks and Queues 1083 BRIEF CONTENTS
  • 11. 19. Searching and Sorting Algorithms 1183 20. Binary Trees 1265 21. Graphs 1321 22. Standard Template Library (STL) 1361 APPENDIX A Reserved Words 1477 APPENDIX B Operator Precedence 1479 APPENDIX C Character Sets 1481 APPENDIX D Operator Overloading 1485 APPENDIX E Additional C++ Topics 1487 APPENDIX F Header Files 1509 APPENDIX G Memory Size on a System and Random Number Generator 1519 APPENDIX H References 1521 APPENDIX I Answers to Odd-Numbered Exercises 1523 INDEX 1555 iv | C++ Programming: Program Design Including Data Structures, Fifth Edition
  • 12. TABLE OF CONTENTS Preface xxv AN OVERVIEW OF COMPUTERS AND PROGRAMMING LANGUAGES 1 Introduction 2 A Brief Overview of the History of Computers 2 Elements of a Computer System 3 Hardware 4 Central Processing Unit and Main Memory 4 Input /Output Devices 5 Software 6 The Language of a Computer 6 The Evolution of Programming Languages 8 Processing a C++ Program 10 Programming with the Problem Analysis–Coding–Execution Cycle 12 Programming Methodologies 20 Structured Programming 20 Object-Oriented Programming 20 ANSI/ISO Standard C++ 22 Quick Review 22 Exercises 23 BASIC ELEMENTS OF C++ 27 A C++ Program 28 The Basics of a C++ Program 31 Comments 32 Special Symbols 32 1 2
  • 13. Reserved Words (Keywords) 33 Identifiers 33 Whitespaces 34 Data Types 35 Simple Data Types 35 Floating-Point Data Types 38 Arithmetic Operators and Operator Precedence 39 Order of Precedence 43 Expressions 44 Mixed Expressions 45 Type Conversion (Casting) 47 string Type 49 Input 50 Allocating Memory with Constants and Variables 50 Putting Data into Variables 53 Assignment Statement 53 Saving and Using the Value of an Expression 56 Declaring and Initializing Variables 57 Input (Read) Statement 58 Variable Initialization 61 Increment and Decrement Operators 65 Output 67 Preprocessor Directives 75 namespace and Using cin and cout in a Program 76 Using the string Data Type in a Program 76 Creating a C++ Program 77 Debugging: Understanding and Fixing Syntax Errors 80 Program Style and Form 84 Syntax 84 Use of Blanks 85 Use of Semicolons, Brackets, and Commas 85 Semantics 85 Naming Identifiers 85 Prompt Lines 86 Documentation 87 Form and Style 87 More on Assignment Statements 89 Programming Example: Convert Length 91 vi | C++ Programming: Program Design Including Data Structures, Fifth Edition
  • 14. Programming Example: Make Change 94 Quick Review 98 Exercises 100 Programming Exercises 109 INPUT/OUTPUT 117 I/O Streams and Standard I/O Devices 118 cin and the Extraction Operator 119 Using Predefined Functions in a Program 124 cin and the get Function 127 cin and the ignore Function 128 The putback and peek Functions 130 The Dot Notation between I/O Stream Variables and I/O Functions: A Precaution 132 Input Failure 133 The clear Function 135 Output and Formatting Output 137 setprecision Manipulator 137 fixed Manipulator 138 showpoint Manipulator 139 setw 142 Additional Output Formatting Tools 144 setfill Manipulator 144 left and right Manipulators 146 Input/Output and the string Type 148 Debugging: Understanding Logic Errors and Debugging with cout Statements 149 File Input/Output 152 Programming Example: Movie Tickets Sale and Donation to Charity 156 Programming Example: Student Grade 162 Quick Review 165 Exercises 166 Programming Exercises 170 CONTROL STRUCTURES I (SELECTION) 175 Control Structures 176 Relational Operators 177 Relational Operators and Simple Data Types 178 3 4 Table of Contents | vii
  • 15. Comparing Characters 179 Relational Operators and the string Type 180 Logical (Boolean) Operators and Logical Expressions 182 Order of Precedence 184 int Data Type and Logical (Boolean) Expressions 187 bool Data Type and Logical (Boolean) Expressions 188 Selection: if and if...else 188 One-Way Selection 189 Two-Way Selection 191 Compound (Block of) Statements 195 Multiple Selections: Nested if 195 Comparing if...else Statements with a Series of if Statements 198 Short-Circuit Evaluation 199 Comparing Floating-Point Numbers for Equality: A Precaution 200 Associativity of Relational Operators: A Precaution 201 Avoiding Bugs by Avoiding Partially Understood Concepts and Techniques 203 Input Failure and the if Statement 206 Confusion between the Equality Operator (==) and the Assignment Operator (=) 209 Conditional Operator (?:) 211 Program Style and Form (Revisited): Indentation 211 Using Pseudocode to Develop, Test, and Debug a Program 212 switch Structures 215 Avoiding Bugs by Avoiding Partially Understood Concepts and Techniques (Revisited) 221 Terminating a Program with the assert Function 223 Programming Example: Cable Company Billing 225 Quick Review 231 Exercises 232 Programming Exercises 241 CONTROL STRUCTURES II (REPETITION) 247 Why Is Repetition Needed? 248 while Looping (Repetition) Structure 249 Designing while Loops 251 Case 1: Counter-Controlled while Loops 252 Case 2: Sentinel-Controlled while Loops 255 5 viii | C++ Programming: Program Design Including Data Structures, Fifth Edition
  • 16. Case 3: Flag-Controlled while Loops 259 Case 4: EOF-Controlled while Loops 263 eof Function 263 More on Expressions in while Statements 268 Programming Example: Fibonacci Number 269 for Looping (Repetition) Structure 273 Programming Example: Classifying Numbers 281 do...while Looping (Repetition) Structure 284 Choosing the Right Looping Structure 289 break and continue Statements 289 Nested Control Structures 291 Avoiding Bugs by Avoiding Patches 296 Debugging Loops 299 Quick Review 300 Exercises 301 Programming Exercises 313 USER-DEFINED FUNCTIONS I 319 Predefined Functions 320 User-Defined Functions 324 Value-Returning Functions 324 Syntax: Value-Returning Functions 326 Syntax: Formal Parameter List 326 Function Call 326 Syntax: Actual Parameter List 327 return Statement 327 Syntax: return Statement 327 Function Prototype 331 Syntax: Function Prototype 332 Value-Returning Functions: Some Peculiarity 333 More Examples of Value-Returning Functions 335 Flow of Execution 340 Programming Example: Largest Number 341 Programming Example: Cable Company 343 Quick Review 349 Exercises 350 Programming Exercises 356 6 Table of Contents | ix
  • 17. USER-DEFINED FUNCTIONS II 361 Void Functions 362 Value Parameters 367 Reference Variables as Parameters 368 Calculate Grade 369 Value and Reference Parameters and Memory Allocation 372 Reference Parameters and Value-Returning Functions 382 Scope of an Identifier 382 Global Variables, Named Constants, and Side Effects 386 Static and Automatic Variables 391 Debugging: Using Drivers and Stubs 392 Function Overloading: An Introduction 395 Functions with Default Parameters 396 Programming Example: Classify Numbers 399 Programming Example: Data Comparison 404 Quick Review 414 Exercises 416 Programming Exercises 424 USER-DEFINED SIMPLE DATA TYPES, NAMESPACES, AND THE string TYPE 433 Enumeration Type 434 Declaring Variables 436 Assignment 436 Operations on Enumeration Types 437 Relational Operators 437 Input /Output of Enumeration Types 438 Functions and Enumeration Types 440 Declaring Variables When Defining the Enumeration Type 442 Anonymous Data Types 442 typedef Statement 443 Programming Example: The Game of Rock, Paper, and Scissors 444 Namespaces 452 string Type 458 Additional string Operations 461 Programming Example: Pig Latin Strings 471 7 8 x | C++ Programming: Program Design Including Data Structures, Fifth Edition
  • 18. Quick Review 475 Exercises 477 Programming Exercises 481 ARRAYS AND STRINGS 485 Arrays 487 Accessing Array Components 488 Processing One-Dimensional Arrays 491 Array Index Out of Bounds 494 Array Initialization During Declaration 495 Partial Initialization of Arrays During Declaration 496 Some Restrictions on Array Processing 496 Arrays as Parameters to Functions 497 Constant Arrays as Formal Parameters 498 Base Address of an Array and Array in Computer Memory 501 Functions Cannot Return a Value of the Type Array 503 Integral Data Type and Array Indices 506 Other Ways to Declare Arrays 507 Searching an Array for a Specific Item 507 C-Strings (Character Arrays) 510 String Comparison 512 Reading and Writing Strings 514 String Input 514 String Output 515 Specifying Input/Output Files at Execution Time 516 string Type and Input/Output Files 516 Parallel Arrays 517 Two- and Multidimensional Arrays 518 Accessing Array Components 520 Two-Dimensional Array Initialization During Declaration 521 Two-Dimensional Arrays and Enumeration Types 521 Initialization 524 Print 525 Input 525 Sum by Row 525 Sum by Column 526 Largest Element in Each Row and Each Column 526 Passing Two-Dimensional Arrays as Parameters to Functions 527 9 Table of Contents | xi
  • 19. Arrays of Strings 530 Arrays of Strings and the string Type 530 Arrays of Strings and C-Strings (Character Arrays) 530 Another Way to Declare a Two-Dimensional Array 531 Multidimensional Arrays 532 Programming Example: Code Detection 534 Programming Example: Text Processing 540 Quick Review 547 Exercises 548 Programming Exercises 558 RECORDS (structS) 563 Records (structs) 564 Accessing struct Members 566 Assignment 568 Comparison (Relational Operators) 569 Input /Output 570 struct Variables and Functions 570 Arrays versus structs 571 Arrays in structs 572 structs in Arrays 574 structs within a struct 576 Programming Example: Sales Data Analysis 580 Quick Review 594 Exercises 594 Programming Exercises 597 CLASSES AND DATA ABSTRACTION 601 Classes 602 Unified Modeling Language Class Diagrams 606 Variable (Object) Declaration 606 Accessing Class Members 607 Built-in Operations on Classes 608 Assignment Operator and Classes 609 Class Scope 609 Functions and Classes 610 Reference Parameters and Class Objects (Variables) 610 10 11 xii | C++ Programming: Program Design Including Data Structures, Fifth Edition
  • 20. Implementation of Member Functions 611 Accessor and Mutator Functions 616 Order of public and private Members of a Class 619 Constructors 621 Invoking a Constructor 623 Invoking the Default Constructor 623 Invoking a Constructor with Parameters 623 Constructors and Default Parameters 626 Classes and Constructors: A Precaution 626 Arrays of Class Objects (Variables) and Constructors 627 Destructors 629 Data Abstraction, Classes, and Abstract Data Types 630 A struct Versus a class 632 Information Hiding 633 Executable Code 637 Static Members of a Class 643 Programming Example: Candy Machine 649 Quick Review 663 Exercises 665 Programming Exercises 670 INHERITANCE AND COMPOSITION 675 Inheritance 676 Redefining (Overriding) Member Functions of the Base Class 679 Constructors of Derived and Base Classes 686 Destructors in a Derived Class 694 Multiple Inclusions of a Header File 695 C++ Stream Classes 696 Protected Members of a Class 698 Inheritance as public, protected, or private 698 Composition (Aggregation) 702 Object-Oriented Design (OOD) and Object-Oriented Programming (OOP) 707 Identifying Classes, Objects, and Operations 709 Programming Example: Grade Report 710 Quick Review 731 Exercises 732 Programming Exercises 739 12 Table of Contents | xiii
  • 21. POINTERS, CLASSES, VIRTUAL FUNCTIONS, ABSTRACT CLASSES, AND LISTS 745 Pointer Data Type and Pointer Variables 746 Declaring Pointer Variables 746 Address of Operator () 747 Dereferencing Operator (*) 748 Classes, Structs, and Pointer Variables 752 Initializing Pointer Variables 755 Dynamic Variables 755 Operator new 756 Operator delete 757 Operations on Pointer Variables 759 Dynamic Arrays 761 Functions and Pointers 764 Pointers and Function Return Values 764 Dynamic Two-Dimensional Arrays 765 Shallow versus Deep Copy and Pointers 768 Classes and Pointers: Some Peculiarities 770 Destructor 770 Assignment Operator 772 Copy Constructor 773 Inheritance, Pointers, and Virtual Functions 780 Classes and Virtual Destructors 787 Abstract Classes and Pure Virtual Functions 787 Array Based Lists 796 Unordered Lists 803 Ordered Lists 807 Address of Operator and Classes 809 Quick Review 812 Exercises 815 Programming Exercises 822 OVERLOADING AND TEMPLATES 827 Why Operator Overloading Is Needed 828 Operator Overloading 829 Syntax for Operator Functions 830 13 14 xiv | C++ Programming: Program Design Including Data Structures, Fifth Edition
  • 22. Overloading an Operator: Some Restrictions 830 Pointer this 831 Friend Functions of Classes 836 Operator Functions as Member Functions and Nonmember Functions 839 Overloading Binary Operators 842 Overloading the Stream Insertion () and Extraction () Operators 848 Overloading the Assignment Operator (=) 853 Overloading Unary Operators 861 Operator Overloading: Member versus Nonmember 867 Classes and Pointer Member Variables (Revisited) 868 Operator Overloading: One Final Word 868 Programming Example: Clock Type 868 Programming Example: Complex Numbers 877 Overloading the Array Index (Subscript) Operator ([]) 882 Programming Example: newString 884 Function Overloading 890 Templates 891 Function Templates 891 Class Templates 893 Array-Based Lists (Revisited) 896 Quick Review 902 Exercises 905 Programming Exercises 910 EXCEPTION HANDLING 919 Handling Exceptions within a Program 920 C++ Mechanisms of Exception Handling 924 try/catch Block 924 Using C++ Exception Classes 931 Creating Your Own Exception Classes 935 Rethrowing and Throwing an Exception 941 Exception-Handling Techniques 946 Terminate the Program 946 Fix the Error and Continue 946 Log the Error and Continue 948 15 Table of Contents | xv
  • 23. Stack Unwinding 948 Quick Review 952 Exercises 954 Programming Exercises 957 RECURSION 959 Recursive Definitions 960 Direct and Indirect Recursion 963 Infinite Recursion 963 Problem Solving Using Recursion 964 Tower of Hanoi: Analysis 973 Recursion or Iteration? 974 Programming Example: Converting a Number from Binary to Decimal 975 Programming Example: Converting a Number from Decimal to Binary 979 Quick Review 982 Exercises 983 Programming Exercises 986 LINKED LISTS 991 Linked Lists 992 Linked Lists: Some Properties 993 Deletion 999 Building a Linked List 1000 Linked List as an ADT 1005 Structure of Linked List Nodes 1006 Member Variables of the class linkedListType 1006 Linked List Iterators 1007 Print the List 1013 Length of a List 1013 Retrieve the Data of the First Node 1014 Retrieve the Data of the Last Node 1014 Begin and End 1014 Copy the List 1015 Destructor 1016 Copy Constructor 1016 Overloading the Assignment Operator 1017 16 17 xvi | C++ Programming: Program Design Including Data Structures, Fifth Edition
  • 24. Unordered Linked Lists 1017 Search the List 1018 Insert the First Node 1019 Insert the Last Node 1020 Header File of the Unordered Linked List 1025 Ordered Linked Lists 1026 Search the List 1027 Insert a Node 1028 Insert First and Insert Last 1032 Delete a Node 1033 Header File of the Ordered Linked List 1034 Print a Linked List in Reverse Order (Recursion Revisited) 1037 printListReverse 1039 Doubly Linked Lists 1040 Default Constructor 1043 isEmptyList 1043 Destroy the List 1043 Initialize the List 1044 Length of the List 1044 Print the List 1044 Reverse Print the List 1044 Search the List 1045 First and Last Elements 1045 Circular Linked Lists 1051 Programming Example: Video Store 1052 Quick Review 1072 Exercises 1072 Programming Exercises 1077 STACKS AND QUEUES 1083 Stacks 1084 Stack Operations 1086 Implementation of Stacks as Arrays 1088 Initialize Stack 1091 Empty Stack 1092 Full Stack 1092 18 Table of Contents | xvii
  • 25. Push 1092 Return the Top Element 1094 Pop 1094 Copy Stack 1096 Constructor and Destructor 1096 Copy Constructor 1097 Overloading the Assignment Operator (=) 1097 Stack Header File 1098 Programming Example: Highest GPA 1102 Linked Implementation of Stacks 1106 Default Constructor 1109 Empty Stack and Full Stack 1109 Initialize Stack 1110 Push 1110 Return the Top Element 1112 Pop 1112 Copy Stack 1114 Constructors and Destructors 1115 Overloading the Assignment Operator (=) 1115 Stack as Derived from the class unorderedLinkedList 1118 Application of Stacks: Postfix Expressions Calculator 1119 Main Algorithm 1122 Function evaluateExpression 1122 Function evaluateOpr 1124 Function discardExp 1126 Function printResult 1126 Removing Recursion: Nonrecursive Algorithm to Print a Linked List Backward 1129 Queues 1133 Queue Operations 1134 Implementation of Queues as Arrays 1136 Linked Implementation of Queues 1145 Queue Derived from the class unorderedLinkedListType 1150 Application of Queues: Simulation 1151 Designing a Queuing System 1152 Customer 1153 Server 1156 xviii | C++ Programming: Program Design Including Data Structures, Fifth Edition
  • 26. Discovering Diverse Content Through Random Scribd Documents
  • 27. had determined not to refuse this challenge, and, therefore, his money was ready. Harry Broome, on the part of his brother Johnny, who was from home, covered the deposit, and the Thursday evening following was named for drawing up articles, at the “Castle,” for a further deposit, and for naming “the novice.” Freeman and Caunt were both present, and the crowd immense. The giant and his mentor, Ben Caunt, arrived late, owing to an accident on the rail near Weedon. Broome proposed to defer naming “the novice;” but this being insisted on, or a forfeit claimed, “William Perry, of Tipton,” was nominated as the “great unknown,” and the following articles “signed, sealed, and delivered”:— “Articles of agreement entered into this 29th of September, 1842, at the Castle Tavern, Holborn, between Charles Freeman and William Perry of Tipton. The said Charles Freeman agrees to fight the said William Perry, a fair stand-up fight, in a four-and-twenty foot roped ring, half minute time, according to the New Rules, for £100 a side, on Tuesday, the 6th of December, half-way between Tipton and London. In pursuance of this agreement, £20 a side are now deposited in the hands of the stakeholder; a second deposit of £10 a side to be made on Thursday, the 6th of October, at Johnny Broome’s; a third deposit of £10 a side on Thursday, the 13th of October, at Johnny Walker’s; a fourth deposit of £10 a side on Thursday, the 20th of October, at Jem Burn’s; a fifth deposit of £10 a side on Thursday, the 27th of October, at Tom Spring’s; a sixth deposit of £10 a side on Thursday, the 3rd of November, at Johnny Broome’s; a seventh deposit of £10 a side on Thursday, the 10th of November, at Tom
  • 28. Spring’s; an eighth deposit of £10 a side on the 17th of November, also at Tom Spring’s; and the ninth and last deposit of £10 a side on Thursday, the 1st of December, at Johnny Broome’s. The said deposits to be made between the hours of 8 and 10 o’clock, p.m., or the party failing to forfeit the money down; a toss for choice of ground to take place on the night of the last deposit. The men to be in the ring between the hours of twelve and one o’clock, or the man absent to forfeit the whole of the stakes. Two umpires and a referee to be chosen on the ground, the decision of the latter in the event of dispute to be conclusive. In case of magisterial interference the referee, if chosen, to name the next time and place of meeting, or if the referee be not chosen then the stakeholder to name the next time and place if possible on the same day; but the money not to be given up until fairly won or lost by a fight; the winner to pay for the ropes and stakes. Should any money be given for the privilege of the fight taking place in any particular locality, such money, if agreed to be accepted, to be equally divided between the men. “(Signed) “Charles Freeman. “John Broome (for W. Perry).” Offers were made to take two to one on the Yankee, but nothing more than six to four could be obtained. The match excited extraordinary interest, and set all the Americans in town on the qui vive. They viewed the success of Freeman as a result already almost attained. After a round of “appearances,” “benefits,” “soirées,” “entertainments,” c. to which the well- advertised fact of being “matched” lent additional
  • 29. attractions, both men went into training, Freeman at Frank Key’s, the “Duke of York,” Gannick Corner, near Barnet, and the Slasher in the first place at our friend Jemmy Parsons’s, at Hampton, and subsequently at Ould Tom Owen’s, at Northfleet, Kent. A contemporary paper thus announces the coming event on the previous Saturday:— “Freeman has been assiduously attended by his friend Ben Caunt, and has been ranging up hill and down dale like the celebrated giant Gog, in his ‘seven-league boots,’ with staff in hand and followed by ‘a tail,’ which, from the length of his fork, generally keeps a respectful distance in his rear. Although his nob has been roofed with a shallow tile, to diminish the appearance of his steeple-like proportions, he still has the appearance of a walking monument, to the no small alarm of the squirrels in Squire Byng’s park, into whose dormitories he occasionally casts a squint of recognition. By his good humour and playfulness of disposition he has won all hearts, and has been a welcome guest on whatever premises he has cast anchor in his walks, which have seldom been less than twenty or thirty miles a day. He has been extremely attentive to his training, and has been much reduced in flesh, while his muscular
  • 30. developments stand forth with additional symmetry. On his arrival in this country he carried some twenty-three stone ‘good meat,’ but we doubt whether on Tuesday he will much exceed eighteen stone. His drawers and fighting shoes have been built with a due regard to ease and elegance, and the latter have been seasonably aired by being lent to a cat and kittens as temporary nurseries. He already sports his blue bird’s-eye fogle, and, without vaunt or unseemly bounce, seems to think his chances of success are planted on a good foundation. “The Slasher has been under the care of Johnny Broome, whose brother is constantly with him, and was removed on Tuesday, for some reason not explained, from Hampton to Northfleet. We have not seen him, but he is described as in fine condition, and in high spirits. He will weigh, we hear, between thirteen and fourteen stone, stands six feet high, and is a well-proportioned, muscular fellow (always deducting the ‘baker-knee,’ which destroys the perpendicular of his pedestal). His flag of cream colour ground, with the union-jack in the centre, bearing the words ‘Old England,’ and the rose, the thistle, and the shamrock in the
  • 31. corner, the whole inclosed in a blue border, has been unfurled at Johnny Broome’s, and has found numerous supporters on the usual terms, ‘a sovereign or nothing.’ The betting within the last week has varied; in some places the Slasher has been taken for choice, in others Freeman has been the favourite at 5 to 4, at which price a good deal of business has been done. The final deposit was made at Johnny Broome’s, in Air Street, Piccadilly, on Thursday evening, in the presence of a goodly muster. Neither of the men was present. Betting was slack, 5 to 4 only being offered on Freeman; but after some breathing a ‘supposed green,’ offered 30 to 10 on the Giant, at which Johnny Broome snapped, as well as 20 to 10 immediately after from the same innocent, who said he had £50 to lay out and was satisfied with a small profit. This, however, did not advance Freeman much in the betting, for, after a good deal of ‘screwing,’ higher odds than 6 to 4, and this reluctantly, could not be obtained. In consequence of a private agreement between the backers of both men, the appointed toss for choice of ground did not take place.” There had long been a complaint in the Fancy circles of the dearth of “great men;” if “great” be
  • 32. synonymous with “big,” then this was a “great fight.” How far it deserved that epithet the reader will shortly be able to decide. The Slasher had never been credited with scientific qualifications, and “the American Giant” was remarkable solely for his prodigious bulk and weight-lifting pretensions, never having fought a prize battle before. The match, we are inclined to think, arose rather from a desire to put the pretensions of “the Yankee critter” to the test than from any belief that a man could be found capable of successfully competing with such “a mountain of humanity;” the more especially as Ben Caunt, the Champion of England, had signified that he and Freeman were sworn friends, and were, therefore, unlikely to come in hostile collision. Johnny Broome was consulted as to whether he could find a man willing to try his hand with the Giant, and he at once answered in the affirmative, experience having afforded him opportunities of estimating the game and muscular qualities of the Slasher, who was perfectly willing to make the experiment. It was under these circumstances the challenge was given and accepted. This was the position in which matters stood when the match was made, and in due course the men went into training, each taking every pains to improve his stamina and physical qualities. We may here remark that, in the opinion of competent judges, the mere fact of Freeman being so much
  • 33. taller and heavier than his opponent was not regarded as an argument in favour of his real superiority. In truth, we have seen, and over and over again been led to believe, that a man standing six feet high, and weighing between twelve and thirteen stone, with muscular power and activity in proportion, is the beau ideal of manly perfection; and that anything beyond this is mere surplusage, seldom, if ever, of any real advantage, as has been remarked of most of the giants who have been exhibited as objects of curiosity. We must admit, however, that for his size, we never saw a man so symmetrical in all respects as Freeman; there was nothing unwieldy or awkward in his appearance. In point of muscular development and strength, too, we are persuaded there was not his equal, and in point of activity and lightness, and springiness of action, he was not less to be admired; in fact, his early career was in the equestrian school, where, among other feats, he rode two horses at once, at the same time balancing a man with his arms above his head as he galloped round the circus, added to which he was renowned for the number of somersaults he could throw in succession. In lifting weights, too, on more occasions than one, he has raised fifteen cwt. from the ground. With all these appliances, however, there yet might be a want of animal courage and natural powers of enduring punishment and fatigue; and in
  • 34. the absence of any criterion upon which an opinion on these latter points could be formed, considerable doubts were entertained of the probable issue of his battle with the Slasher, who was known to possess fearless intrepidity, great bodily strength, some science, and sufficient height and weight to entitle himself to be ranked among the most dangerous of our modern millers. Hence the betting, which seldom exceeded 5 to 4 in favour of Freeman, did not prove him to have inspired any extraordinary confidence in the minds of his friends, of whom, from his really unassuming conduct, civil deportment, and good temper, he had many. We may here state that the wisdom of not ascribing too much merit to superior bulk derived confirmation from scientific calculations made by Mr. Hutchinson, a surgeon of eminence, who made some curious experiments by means of hydraulic and other instruments to ascertain the constitutional powers of human beings, founded on comparisons of the strength of their lungs, by respiration and inspiration, the state of their pulse, capacity of chest, height, weight, c. Mr. Hutchinson submitted both Freeman and Perry to his tests, and the result of his observation was, that although Freeman’s admeasurement was extraordinary in every respect, yet, comparatively, when the dimensions of both men
  • 35. were taken into account, the balance of bodily power, strength, and endurance was in favour of Perry, who Mr. Hutchinson considered more calculated to sustain fatigue and punishment than his gigantic antagonist. Mr. Hutchinson, of course, admitted that the inference which he thus drew may be defeated by accidental or other causes; but looking to the mere animal qualities of the men, such was his conclusion. That his hypothesis was fairly tried cannot be asserted, for, as will be seen, both men left off, so far as we were capable of judging from the darkness which prevailed, pretty much on a par, whether as respects punishment or fatigue. It will be borne in mind that at the making of the last deposit, the toss for choice of ground was dispensed with, Spring, on the part of Freeman, and Broome, on the part of Perry, having determined on the probable locality. It was felt desirable to preserve the secret as long as possible, and it was not till Monday that the direction was generally known, when a trip by the Eastern Counties Railway to the borders of Hertfordshire and Essex was announced, with an intimation that a simultaneous departure by the half-past nine o’clock train to Sawbridgeworth (about seven and twenty miles from London) would suit all purposes, and prevent any unnecessary bustle at the immediate scene of action. Notwithstanding
  • 36. the secrecy which had been observed, however, some few “go-carts” with their motley inmates were seen going down the road the night before, and thus a hint was given, of which the police took advantage; and hence, being on the alert, the attendance of a magistrate was obtained, and much trouble and inconvenience, as the sequel will show, were experienced. In the interim both men arrived in town at their respective head-quarters, Freeman at Tom Spring’s, and Perry at Johnny Broome’s, so as to be ready for their morning start, and both houses were crowded to excess. With the dawn all were in motion, and by eight o’clock the London terminus of the chosen railway was besieged by visitors. Many of these brought drags, which were placed upon the trucks, while others trusted to the “chapter of accidents,” which proved to have a very wide range, for the means of conveyance. Among the first arrivals were the Tipton Slasher and his friends, who thus took time by the forelock, so as to be near the point of rendezvous in due season. This division agreed to alight at Harlow station, as the train did not pull up at Sawbridgeworth, which was, however, but two miles further, within convenient toddling distance, and thither all proceeded. On reaching the fixture a damper was thrown on the prospects of the
  • 37. travellers. The superintendent of police was found at his post. He had received orders from London to prevent hostilities, and to this was added the fact that Mr. Phillips, a Hertfordshire magistrate, was in readiness to “keep the peace.” In this unpleasant dilemma all waited till the arrival of the half-past nine o’clock train, in which came Freeman, Tom Spring, Caunt, and a vast accession of the Fancy. Fortunately there was a carriage and four horses waiting the arrival of Freeman, and after a short deliberation it was resolved to move on to Hatfield Heath, about four miles further, in the county of Essex, and the “office” being given, away all went in that direction—​ the great proportion on their ten toes, for conveyances were out of the question—​ and the roads being heavy the pilgrimage was far from agreeable, especially to “the London particulars,” who were unprepared for such a journey. For this unexpected tax upon their patience there was no remedy, and on they went till the desired goal was reached. On the road there were some few mishaps, but still all were cheered on by hope. The Commissary lost no time in examining the intended field of battle, which he found swampy, and far from desirable; but there was no help for it, and he was about to form a ring when a fresh alarm was given. The Sawbridgeworth police superintendent and Mr. Phillips, the magistrate, once more presented their ill-omened countenances, and
  • 38. plainly declared their determination to prevent the fight taking place either in Essex or Hertfordshire This was a poser. A council of war was held—​ suggestions of all sorts were offered, and a great deal of time was lost. Cambridgeshire, the adjoining county, was deemed too distant to be reached in time, and more especially by the pedestrians; and at last it was determined to “try back,” and return towards London; Broxbourne, on the borders of Middlesex and Essex, being agreed on as the point of re-assemblage. This point settled, a general move took place towards the nearest stations—​ the toddlers to Sawbridgeworth, and the charioteers to Bishop Stortford, there to repack their nags and drags, while the beak and his co-partner, considering that a move had been made to get out of their bailiwick, also moved off. On reaching Bishop Stortford a fresh resolution was formed. “While the cat’s away the mice will play;” so, as the conservators of propriety were no longer present, it was urged that the ring might be formed in the place originally intended, half a mile from the Sawbridgeworth station, not far from the same field in which Turner beat Scroggins, in June, 1817, and scarcely more distant from the scene of Oliver’s conquest over Shelton, in 1820. No sooner said than done; and, in the absence of those who
  • 39. had promised to avoid the county of Hertford, at half- past two o’clock all agreed to drop down to the place from whence they came, with the exception of the Commissary, Freeman, and his friends, who took the main road in a carriage kindly yielded to them by the Right Rev. the Bishop of Bond Street, who also hospitably furnished their larders with a very welcome supply of roast fowls and other “combustibles,” of which their “inward men” stood beseechingly in need. In the interim the Slasher threw himself on a bed at Bishop Stortford, and all who had wisdom took some hasty refreshment. On again reaching Sawbridgeworth we were informed that the lists were formed, and a competent guide being found, all set out along the towing-path of the canal to a very eligible site, about half a mile off, on an elevated piece of ground admirably calculated for the purpose. The evening was now fast approaching, for it was nearly four o’clock, and it was hoped there would be still daylight sufficient to decide which was the better man. The privilege tickets were distributed, and in a short time everything was arranged for the commencement of hostilities. All being in readiness, Freeman entered the ring in high spirits, attended by Caunt and King Dick, and was received with loud cheers. Rumours were now afloat that the Slasher did not mean to come, and
  • 40. sovereigns even were offered to be laid that there would be no fight. In the interim horsemen were sent off to Sawbridgeworth station to urge the approach of the missing man, who it was known had been left there in charge of Broome. Matters thus remained in doubt for some time, and great impatience began to be manifested, when it was announced, to the great joy of the spectators, that the Slasher was coming—​ and come at last he did, amidst the encouraging shouts of his friends. He lost no time in entering the ring, and was immediately met with a friendly shake of the mauley by Freeman. The Slasher was attended by Ben Terry and a provincial friend named Tom Parker. No time was now lost in “trimming” the men for battle, and their superfluous “feathers” were quickly removed. Both appeared in high spirits and eager for business. Umpires and a referee having been chosen, the ring was cleared out, and the “privileged” dropped contentedly on the damp earth, with such preservatives to their sitting places as circumstances would permit; but it must be acknowledged that these were far from satisfactory, owing to the difficulties to which the Commissary had been exposed in the various transfers of his materiel. On being stripped and placed in juxtaposition, the towering height of Freeman presented a most formidable aspect, while the muscular development
  • 41. of every limb, and the broad expanse of his chest and shoulders, gave him the appearance of herculean strength. His weight, without his clothes, we understood was but little above seventeen stone, for it was remarked that during the last week of his training he rather diminished than increased in bulk. Still, he was in high spirits, and moved about with elastic and graceful step. In the following July he would be 23 years of age. The Slasher also wore a cheerful smile on his mug, which betrayed the fact that he had already lost some of his head rails. From his hips up his bust displayed great muscular power, but being in-kneed, there was less of symmetry in his figure than in Freeman’s. On throwing himself into position, however, this was scarcely perceptible, and he may be described as a model of burly strength. He appeared to be, and said he was, in excellent condition, and, judging from his cheerful index, there was no want of self-confidence. His height six feet, his age twenty-three, and his weight 13st. 4lb.; but notwithstanding the fearful odds against him, he evidently regarded the coming struggle with gallant indifference. Of betting there was but little—​ 5 to 3 was offered but not taken, and the only bet we heard laid was one of 6 to 4 on Freeman. THE FIGHT.
  • 42. Round 1.—​ Precisely at seven minutes after four o’clock the men were conducted to the scratch, their fogles having been first tied to the corner stake, and having shaken hand with great good humour, the seconds retired to their corners. The towering height and gigantic proportions of Freeman led all to suppose that he would endeavour to fight down his opponent; but, as will be seen, this anticipation was not fulfilled. The Slasher stood on the defensive and Freeman broke ground, hitting out with his left; from this the Slasher retreated, when Freeman followed him quickly, popped in his left and right slightly, and the Slasher was down. Freeman laughing, and no mischief done. 2.—​ The Slasher again to the scratch, when Freeman led off left and right; the latter blow got well home, and dropped the Slasher. First knock-down blow for Freeman; but no damage done, as the Slasher received it when retreating. 3.—​ The Slasher made play, and tried his left on Freeman’s body, but was stopped. Freeman rushed to him, the Slasher retiring and hitting short and wild. Freeman popped in his left and right, caught the Slasher in his arms, and threw him with ease. 4.—​ The Slasher, on the defensive system, dodged a little, delivered his left on the ribs, in getting away he fell, and thus escaped Freeman’s return. 5.—​ Freeman hit out left and right, but the Slasher ducked his head and fell on his knees. 6.—​ The Slasher on the dodging system, stepped back; Freeman after him to the corner, where there was a wild rally, in which hits right and left were exchanged. The Slasher got within Freeman’s long arms, gave him a tidy smack with his right on the left eye, and got down. (First blood from Freeman’s brow, and the Tipton lads uproarious.)
  • 43. 7.—​ The Slasher, the first to fight, hit out left and right, but was stopped. Freeman slashed away left and right but without precision, and after some trifling deliveries the Slasher got down. 8.—​ The Slasher popped in his left on Freeman’s ribs, and got away; Freeman after him, when the Slasher closed. Freeman lifted him clean off the ground, but was unable to get his arm loose to fib, and after a short struggle the Slasher slipped from his grasp and got down. 9.—​ The Slasher again led off with his left at the body, and in getting away fell from accident or design. [Cries of “foul” and “foul” was claimed on the part of Freeman; but the referee did not feel himself justified in stopping the fight, and “time” was called.] 10.—​ The Slasher again tried the artful dodge, rushed in to hit with the left at the body; but Freeman seized him in his powerful feelers, held him up for a short time, and finding he could do nothing at in-fighting fell on him, but not so as to do him any mischief. 11.—​ The Slasher as lively as a grig popped in his left on Freeman’s arm and got away; Freeman followed, gave him one, two, left and right The Slasher broke from him, and delivered his right on his shoulder; then getting away, fell to avoid. 12.—​ The Slasher once more led off with his left, but was short. Freeman after him delivered left and right; the Slasher down. 13.—​ Freeman popped in his left, The Slasher retreated and fell. 14.—​ Freeman again planted his left slightly. The Slasher adhered to his retiring system. Freeman followed him to the
  • 44. ropes, and after a scrambling exchange of hits the Slasher got down. Freeman pointing at him derisively with his finger and laughing. 15.—​ Freeman hit left and right, and the Slasher rushed in and caught him round the body, to try for the fall; Freeman held him up completely off the ground by the neck, then chopped first with the left and then with the right; the Slasher hit up left and right, and caught Freeman on the mouth with his right; and after a short struggle was thrown, Freeman on him. 16.—​ The Slasher again tried his left at the body, but was short, the blow falling slightly on Freeman’s arm. Exchange of blows. Freeman with the left on the nob, and Slasher on the shoulder with the right, which sounded, but was of no effect. Slasher, in retreating, fell. 17.—​ Slasher came up on the defensive, but Freeman hit him down with his left. 18.—​ Slasher again popped his left at the body, but was hit down with a counter-hit from Freeman’s left. Freeman fell on him, and foul was claimed by Slasher’s party, but not acknowledged, as it was obvious the fall was accidental. 19.—​ Slasher hit Freeman on the shoulder with his right, and in return caught it left and right as he retreated. Slasher returned to the charge with his right, and fell. 20.—​ A wild exchange of blows, but not effective, and the Slasher slipped down in retreating. 21.—​ [Twenty-three minutes had now elapsed, no real damage done on either side, and both as fresh as when they commenced.] The Slasher popped in his left on the body, and stepped back; Freeman after him, hit left and right, and the Slasher fell.
  • 45. 22.—​ Freeman delivered left and right; the Slasher was short in his return, and again received two pops left and right, and fell. 23.—​ Freeman delivered left and right, and Slasher down. 24.—​ Freeman led off with his left. The Slasher popped in his left on the mark and tried to drop, but Freeman caught him round the neck and held him up some time, and then let him fall, tumbling over him. (Another claim of foul not allowed.) 25.—​ Freeman popped in his right on Slasher’s left eye; the Slasher countered on his shoulder, when Freeman caught him with his left, and the Slasher was down. 26.—​ Freeman again planted his left; and, on Slasher rushing in, caught him in his arms, held him for a second or two, and fell on him. 27.—​ Freeman popped in his left, and dropped his man with his right. 28.—​ The Slasher hit short with his left, and renewed the dodging system, playing round his man. Freeman tried to nail him, but he got away, hit out with his left at the body, and fell without a return. [Another claim of foul for Freeman, not admitted.] 29.—​ Slasher hit at the body with his left and broke away, Freeman after him, all for mischief, caught him on the hop, and hit him down with his right. 30.—​ The Slasher delivered his right on Freeman’s shoulder, broke away, and tried it with the left on the body, but was stopped. Freeman let go left and right, but the Slasher ducked his nob, escaped, and fell.
  • 46. 31.—​ The Slasher again in with his left on the ribs and away; Freeman after him, caught him on the pimple, and he fell. 32.—​ The Slasher hit short left and right, and was hit down with Freeman’s left. 33.—​ The Slasher pursued his left-handed game at the body, but, in getting away, was hit down with a touch from Freeman’s left. 34.—​ The Slasher missed left and right, caught it left and right, and was down. 35.—​ [It now became so dark that it was difficult to see what was doing in the ring, and the spectators came closer to the ropes. The partisans of the Slasher were extremely uproarious, and one of them especially was constantly interfering with the umpires, called “time” when it was not time, and was guilty of other most offensive and unfair conduct.] The Slasher, as usual, led off with his left at the body, but without effect, and in return was hit down. 36.—​ The Slasher hit short with his left, and was hit down by a counter from Freeman’s left as he was getting away. 37.—​ Slasher planted his favourite body blow with the left, but without producing any visible effect; Freeman did not seem to feel it, and he was again down. 38.—​ Trifling exchanges with the left, and the Slasher down. 39.—​ The Slasher rushed in to make another effort for the throw, but Freeman again seized him in his powerful grasp, fibbed, and fell with him, but not on him. 40, 41, 42, 43, 44.—​ Slasher down in every round, but apparently no mischief done, and as far as the glimpse of light
  • 47. left would permit, we could discover no distinct mark of punishment on either man. 45.—​ The Slasher delivered his left at the body and fell, as if from the force of his own blow. Freeman fell over him, but evidently with a desire to avoid falling on him. [Another appeal was made to the referee on the ground of the Slasher falling without a blow, but the referee declared it was impossible to form a correct opinion, and expressed a strong wish that the fight should either be drawn or adjourned, but to this neither party would accede.] 46, 47, and 48.—​ The Slasher down in each round, and Freeman manfully avoiding falling on him. 49.—​ The Slasher in with his left on the body, but as he attempted to retreat Freeman caught him in his arms, held him for some time, occasionally chopping, and at last fell forward on him, but too much over to produce any consequence. 50.—​ The Slasher showed some fatigue, but came up full of confidence. He delivered his left at the body, but did not get well home; Freeman caught him left and right, and he went down to avoid further mementoes. To describe the remaining rounds would be an idle attempt, in fact it became so dark that the men were only visible from the light colour of their skins and drawers. The Slasher pursued his dodging, getting away, and falling system, occasionally making his left and right hits at the body and shoulder, and sometimes appearing to recoil from the effects of his own blows, but without producing any turn in his favour. Freeman hitting left and right, and now and then seizing his man, lifting him up, and flinging him down, but almost invariably avoiding falling on him; in one instance actually making an arch over his carcase, his head and legs on the ground, amidst the acclamations of the throng. In the last
  • 48. few rounds there was an evident attempt to draw Freeman into the Slasher’s corner, round which a desperate set of ruffians had collected, who, by the most offensive vociferations, endeavoured to intimidate and alarm him. He, however, kept his temper, and came up every round cool and collected, grumbling only at the Slasher not standing up to fight. In the 69th round the Slasher exclaimed, “I’ve got you now, old fellow!” but the words were scarcely out of his mouth when Freeman hit him down with his left. The darkness, combined with a fog, now became so intense that it was impossible to see what was doing from one side of the ring to the other. The referee declared his utter inability to form any judgment of the character of the fight, and, unable to get both umpires to agree on the expediency of putting an end to the battle, he jumped into the ring, and, getting between the men, declared he would not permit them to prolong the contest. At this moment both men were fresh and vigorous, and each seemed disinclined to leave his chance of victory in doubt, Slasher especially, who said he considered he was robbed of the fight, while Freeman laughed, and said, if they were permitted to proceed, the result would perhaps prove he was mistaken. The referee was, however, peremptory, and both men were taken from the ring after having fought seventy rounds in one hour and twenty-four minutes. They walked away as fresh as when they began, with a mutual desire that they might renew the combat the next day at twelve o’clock, at such place as the referee might appoint, to which the latter assented, as there did not appear to be anything in their appearance to justify a further delay in the gratification of their desires. Remarks.—​ It is much to be regretted that this curious encounter was not brought to a more satisfactory conclusion, inasmuch as the merits of the men still remain undecided; and so evenly had their pretensions been balanced in the minds of their respective friends that each party declares, had
  • 49. time and circumstances permitted, their favourite must have been crowned with victory. How far these conclusions may be well or ill founded we will not pretend to say; but certainly we feel justified in giving to both men an equal proportion of praise, so far at least as their game qualities are concerned. It is true, we may be disposed to take exception to the “getting down” system which was adopted by the Slasher, but then it must be borne in mind he fought at fearful odds both as regards weight and length, and could never hope successfully to compete with such an antagonist unless by a degree of caution and cunning, which with a man of his own inches would have been unjustifiable and amounted to cowardice. There is no doubt that occasionally his dropping after delivering his blows had too much the appearance of being at variance with our notion of “a fair stand-up fight;” but then the ground was slippery, and he asserts that when he did fall it was from the recoil of his own blows or from his being unable to keep his feet in endeavouring to avoid the tremendous return which he had sufficient reason to expect. That this was provoking to Freeman we can well imagine; but, under all the circumstances, we do not think it detracts from the game qualities of the Slasher, who certainly came up from first to last undismayed, and with a manly determination to win if he could. Of his scientific qualifications we cannot say much. If he possessed any they were reserved for a future occasion. He never attempted to stop the blows which were showered on his canister, and throughout confined himself to attempts to disable Freeman by body blows from his left or round hits with his right. The former occasionally reached their destination with sounding effect, but we are inclined to believe they fell more frequently on Freeman’s arm, which was dropped to catch them, than upon his more vulnerable corpus. That some of them might have got home we are inclined to believe, but it was clear they did not produce any serious consequence, for on examining the Giant’s body subsequently we were surprised to find so few symptoms of
  • 50. Welcome to our website – the ideal destination for book lovers and knowledge seekers. With a mission to inspire endlessly, we offer a vast collection of books, ranging from classic literary works to specialized publications, self-development books, and children's literature. Each book is a new journey of discovery, expanding knowledge and enriching the soul of the reade Our website is not just a platform for buying books, but a bridge connecting readers to the timeless values of culture and wisdom. With an elegant, user-friendly interface and an intelligent search system, we are committed to providing a quick and convenient shopping experience. Additionally, our special promotions and home delivery services ensure that you save time and fully enjoy the joy of reading. Let us accompany you on the journey of exploring knowledge and personal growth! ebookfinal.com