C++ How to Program Early Objects Version 9th Edition Deitel Solutions Manual
C++ How to Program Early Objects Version 9th Edition Deitel Solutions Manual
C++ How to Program Early Objects Version 9th Edition Deitel Solutions Manual
C++ How to Program Early Objects Version 9th Edition Deitel Solutions Manualpakwanritler
C++ How to Program Early Objects Version 9th Edition Deitel Solutions Manual
C++ How to Program Early Objects Version 9th Edition Deitel Solutions Manual
C++ How to Program Early Objects Version 9th Edition Deitel Solutions Manual
Problem Solving with C++ 9th Edition Savitch Test Bankazzahentie
Problem Solving with C++ 9th Edition Savitch Test Bank
Problem Solving with C++ 9th Edition Savitch Test Bank
Problem Solving with C++ 9th Edition Savitch Test Bank
Problem Solving with C++ 9th Edition Savitch Test Bankgetuarforan77
Problem Solving with C++ 9th Edition Savitch Test Bank
Problem Solving with C++ 9th Edition Savitch Test Bank
Problem Solving with C++ 9th Edition Savitch Test Bank
Problem Solving with C++ 9th Edition Savitch Test Bankdocimonagi
Problem Solving with C++ 9th Edition Savitch Test Bank
Problem Solving with C++ 9th Edition Savitch Test Bank
Problem Solving with C++ 9th Edition Savitch Test Bank
Problem Solving with C++ 9th Edition Savitch Test Bankskaroudinsey
Problem Solving with C++ 9th Edition Savitch Test Bank
Problem Solving with C++ 9th Edition Savitch Test Bank
Problem Solving with C++ 9th Edition Savitch Test Bank
1. The document discusses arrays, including declaring and initializing arrays, passing arrays to functions, and sorting and analyzing array data.
2. Common array operations like finding the mean, median, and mode are demonstrated using arrays of survey response data.
3. Key array concepts covered are declaring arrays with a specified size and type, accessing elements with subscripts, passing entire arrays or individual elements to functions by reference or value, and sorting an array using a bubble sort algorithm.
C++ Programming From Problem Analysis to Program Design 7th Edition Malik Tes...mkesgoggo
C++ Programming From Problem Analysis to Program Design 7th Edition Malik Test Bank
C++ Programming From Problem Analysis to Program Design 7th Edition Malik Test Bank
C++ Programming From Problem Analysis to Program Design 7th Edition Malik Test Bank
C++ How to Program 10th Edition Deitel Solutions Manualleletydanni
C++ How to Program 10th Edition Deitel Solutions Manual
C++ How to Program 10th Edition Deitel Solutions Manual
C++ How to Program 10th Edition Deitel Solutions Manual
This document provides an overview of arrays and vectors in C++ based on Chapter 8 of the textbook "Starting Out with C++ Early Objects". It covers topics such as declaring and initializing arrays, accessing array elements using subscripts, inputting and displaying array contents, processing array contents using loops and arithmetic operations, parallel arrays, multi-dimensional arrays, and passing arrays as function arguments. Key concepts explained include array storage in memory, array terminology, array size and type, range-based for loops, partially filled arrays, and the typedef statement for creating array type aliases.
Lecture#8 introduction to array with examples c++NUST Stuff
The document discusses arrays in C++. It defines arrays as structures that hold a collection of related data items of the same type. Arrays have a fixed size that is set when they are declared. Individual elements in an array are accessed using an index number inside square brackets. The document provides examples of declaring, initializing, and accessing values in arrays. It also demonstrates using a constant variable to set the size of an array and looping through arrays to sum elements or print a histogram.
This document provides an overview of arrays and linked lists as data structures. It discusses arrays, including declaration, initialization, updating elements, and multi-dimensional arrays. It also covers searching arrays, why arrays are needed, pros and cons of arrays, and character strings as arrays. The document then introduces linked lists as a data structure and discusses linked list operations like printing all elements, adding nodes, appending nodes, inserting nodes, and deleting nodes. Homework questions on arrays and linked lists are provided at the end.
The document discusses various concepts related to arrays in C/C++ including:
- What an array is and its key properties like contiguous memory locations and common data type
- Different types of arrays like single dimensional and multi dimensional
- How to declare, initialize and access array elements
- Passing arrays to functions
- Searching and sorting arrays
- Common array operations like insertion and deletion
The document discusses C++ arrays, including how to declare and initialize single-dimensional and multi-dimensional arrays, access array elements, and pass arrays to functions. It provides examples of declaring arrays of different data types, initializing arrays using aggregate initialization, and accessing elements within and outside of the declared bounds of the arrays. It also demonstrates some errors that can occur with array declarations and initialization.
Here is the program to copy elements of an array into another array in reverse order:
#include <iostream>
using namespace std;
int main() {
int arr1[10], arr2[10];
cout << "Enter 10 integer inputs: ";
for(int i=0; i<10; i++) {
cin >> arr1[i];
}
for(int i=0, j=9; i<10; i++, j--) {
arr2[j] = arr1[i];
}
cout << "Array 1: ";
for(int i=0; i<10; i++) {
cout << arr1[i
The document discusses arrays in C++. It explains one-dimensional and two-dimensional arrays, how to declare, initialize, and access elements of arrays. Key points include arrays storing a collection of like-typed data, being indexed starting from 0, initializing during declaration, and accessing two-dimensional array elements requiring row and column indices. Examples are provided to demonstrate array concepts.
The document contains solutions to chapter 7 questions from ANCI C programming. It includes explanations and code for problems related to one-dimensional arrays, two-dimensional arrays, multi-dimensional arrays, dynamic arrays, initializing and accessing array elements, and more. Multiple choice and fill-in-the-blank questions are provided with answers. Programming exercises cover topics like finding the slope and y-intercept of a line, maximum/minimum temperature analysis, vote counting, and generating Pascal's triangle.
An array is a collection of variables of the same data type stored in contiguous memory locations. There are two types of arrays: single dimensional and multi-dimensional arrays. A single dimensional array stores elements in adjacent memory locations. Multi-dimensional arrays can store arrays of arrays. Two dimensional arrays are commonly used to represent matrices. Arrays allow traversing, searching, and initializing elements. Functions can accept arrays as arguments which are treated as pointers to the first element.
An array is a collection of elements of the same data type. It can be initialized with values specified in braces when declared. Individual array elements can be accessed using the array name and subscript index. Arrays can be passed as parameters to functions by passing the array name without brackets. Basic operations on arrays include traversing, searching, sorting, and merging elements.
computer dataA computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations (computation) automatically. Modern digital electronic computers can perform generic sets of operations known as programs. These programs enable computers to perform a wide range of tasks. A computer system is a nominally complete computer that includes the hardware, operating system (main software), and peripheral equipment needed and used for full operation. This term may also refer to a group of computers that are linked and function together, such as a computer network or computer cluster.
A broad range of industrial and consumer products use computers as control systems. Simple special-purpose devices like microwave ovens and remote controls are included, as are factory devices like industrial robots and computer-aided design, as well as general-purpose devices like personal computers and mobile devices like smartphones. Computers power the Internet, which links billions of other computers and users.
Early computers were meant to be used only for calculations. Simple manual instruments like the abacus have aided people in doing calculations since ancient times. Early in the Industrial Revolution, some mechanical devices were built to automate long, tedious tasks, such as guiding patterns for looms. More sophisticated electrical machines did specialized analog calculations in the early 20th century. The first digital electronic calculating machines were developed during World War II. The first semiconductor transistors in the late 1940s were followed by the silicon-based MOSFET (MOS transistor) and monolithic integrated circuit chip technologies in the late 1950s, leading to the microprocessor and the microcomputer revolution in the 1970s. The speed, power and versatility of computers have been increasing dramatically ever since then, with transistor counts increasing at a rapid pace (as predicted by Moore's law), leading to the Digital Revolution during the late 20th to early 21st centuries.
This document discusses two-dimensional arrays. It explains that two-dimensional arrays consist of rows and columns, and can be initialized when declared by listing values in braces separated by commas. Elements are accessed using subscripts for the row and column, such as arrayName[row][column]. Nested for loops are commonly used to traverse each element. Arrays can have more than two dimensions but are rarely used with more than two. Common errors include exceeding the array bounds or forgetting to initialize elements.
The document discusses arrays in C++. It defines arrays as collections of data of the same type used to store multiple values. Arrays are declared with a type followed by brackets containing the number of elements, such as int score[5]. Indexed elements can be accessed using subscript notation like score[0]. Arrays can be passed to functions as arguments. Functions can process the entire array but do not know its size, so a size parameter is typically included. Arrays cannot be returned from functions.
The document discusses arrays in C++. It defines arrays as collections of data of the same type used to store multiple values. Arrays are declared with a type followed by brackets containing the number of elements, such as int score[5]. Indexed elements can be accessed using subscript notation like score[0]. Arrays can be passed to functions as arguments. Functions can process the entire array but do not know its size, so a size parameter is typically included. Arrays cannot be returned from functions.
This presentation has been made keeping in mind the students of undergraduate and postgraduate level. To keep the facts in a natural form and to display the material in more detail, the help of various books, websites and online medium has been taken. Whatever medium the material or facts have been taken from, an attempt has been made by the presenter to give their reference at the end.
In the seventh century, the rule of Sindh state was in the hands of Rai dynasty. We know the names of five kings of this dynasty- Rai Divji, Rai Singhras, Rai Sahasi, Rai Sihras II and Rai Sahasi II. During the time of Rai Sihras II, Nimruz of Persia attacked Sindh and killed him. After the return of the Persians, Rai Sahasi II became the king. After killing him, one of his Brahmin ministers named Chach took over the throne. He married the widow of Rai Sahasi and became the ruler of entire Sindh by suppressing the rebellions of the governors.
Adam Grant: Transforming Work Culture Through Organizational PsychologyPrachi Shah
This presentation explores the groundbreaking work of Adam Grant, renowned organizational psychologist and bestselling author. It highlights his key theories on giving, motivation, leadership, and workplace dynamics that have revolutionized how organizations think about productivity, collaboration, and employee well-being. Ideal for students, HR professionals, and leadership enthusiasts, this deck includes insights from his major works like Give and Take, Originals, and Think Again, along with interactive elements for enhanced engagement.
More Related Content
Similar to C++ How to Program Early Objects Version 9th Edition Deitel Solutions Manual (20)
1. The document discusses arrays, including declaring and initializing arrays, passing arrays to functions, and sorting and analyzing array data.
2. Common array operations like finding the mean, median, and mode are demonstrated using arrays of survey response data.
3. Key array concepts covered are declaring arrays with a specified size and type, accessing elements with subscripts, passing entire arrays or individual elements to functions by reference or value, and sorting an array using a bubble sort algorithm.
C++ Programming From Problem Analysis to Program Design 7th Edition Malik Tes...mkesgoggo
C++ Programming From Problem Analysis to Program Design 7th Edition Malik Test Bank
C++ Programming From Problem Analysis to Program Design 7th Edition Malik Test Bank
C++ Programming From Problem Analysis to Program Design 7th Edition Malik Test Bank
C++ How to Program 10th Edition Deitel Solutions Manualleletydanni
C++ How to Program 10th Edition Deitel Solutions Manual
C++ How to Program 10th Edition Deitel Solutions Manual
C++ How to Program 10th Edition Deitel Solutions Manual
This document provides an overview of arrays and vectors in C++ based on Chapter 8 of the textbook "Starting Out with C++ Early Objects". It covers topics such as declaring and initializing arrays, accessing array elements using subscripts, inputting and displaying array contents, processing array contents using loops and arithmetic operations, parallel arrays, multi-dimensional arrays, and passing arrays as function arguments. Key concepts explained include array storage in memory, array terminology, array size and type, range-based for loops, partially filled arrays, and the typedef statement for creating array type aliases.
Lecture#8 introduction to array with examples c++NUST Stuff
The document discusses arrays in C++. It defines arrays as structures that hold a collection of related data items of the same type. Arrays have a fixed size that is set when they are declared. Individual elements in an array are accessed using an index number inside square brackets. The document provides examples of declaring, initializing, and accessing values in arrays. It also demonstrates using a constant variable to set the size of an array and looping through arrays to sum elements or print a histogram.
This document provides an overview of arrays and linked lists as data structures. It discusses arrays, including declaration, initialization, updating elements, and multi-dimensional arrays. It also covers searching arrays, why arrays are needed, pros and cons of arrays, and character strings as arrays. The document then introduces linked lists as a data structure and discusses linked list operations like printing all elements, adding nodes, appending nodes, inserting nodes, and deleting nodes. Homework questions on arrays and linked lists are provided at the end.
The document discusses various concepts related to arrays in C/C++ including:
- What an array is and its key properties like contiguous memory locations and common data type
- Different types of arrays like single dimensional and multi dimensional
- How to declare, initialize and access array elements
- Passing arrays to functions
- Searching and sorting arrays
- Common array operations like insertion and deletion
The document discusses C++ arrays, including how to declare and initialize single-dimensional and multi-dimensional arrays, access array elements, and pass arrays to functions. It provides examples of declaring arrays of different data types, initializing arrays using aggregate initialization, and accessing elements within and outside of the declared bounds of the arrays. It also demonstrates some errors that can occur with array declarations and initialization.
Here is the program to copy elements of an array into another array in reverse order:
#include <iostream>
using namespace std;
int main() {
int arr1[10], arr2[10];
cout << "Enter 10 integer inputs: ";
for(int i=0; i<10; i++) {
cin >> arr1[i];
}
for(int i=0, j=9; i<10; i++, j--) {
arr2[j] = arr1[i];
}
cout << "Array 1: ";
for(int i=0; i<10; i++) {
cout << arr1[i
The document discusses arrays in C++. It explains one-dimensional and two-dimensional arrays, how to declare, initialize, and access elements of arrays. Key points include arrays storing a collection of like-typed data, being indexed starting from 0, initializing during declaration, and accessing two-dimensional array elements requiring row and column indices. Examples are provided to demonstrate array concepts.
The document contains solutions to chapter 7 questions from ANCI C programming. It includes explanations and code for problems related to one-dimensional arrays, two-dimensional arrays, multi-dimensional arrays, dynamic arrays, initializing and accessing array elements, and more. Multiple choice and fill-in-the-blank questions are provided with answers. Programming exercises cover topics like finding the slope and y-intercept of a line, maximum/minimum temperature analysis, vote counting, and generating Pascal's triangle.
An array is a collection of variables of the same data type stored in contiguous memory locations. There are two types of arrays: single dimensional and multi-dimensional arrays. A single dimensional array stores elements in adjacent memory locations. Multi-dimensional arrays can store arrays of arrays. Two dimensional arrays are commonly used to represent matrices. Arrays allow traversing, searching, and initializing elements. Functions can accept arrays as arguments which are treated as pointers to the first element.
An array is a collection of elements of the same data type. It can be initialized with values specified in braces when declared. Individual array elements can be accessed using the array name and subscript index. Arrays can be passed as parameters to functions by passing the array name without brackets. Basic operations on arrays include traversing, searching, sorting, and merging elements.
computer dataA computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations (computation) automatically. Modern digital electronic computers can perform generic sets of operations known as programs. These programs enable computers to perform a wide range of tasks. A computer system is a nominally complete computer that includes the hardware, operating system (main software), and peripheral equipment needed and used for full operation. This term may also refer to a group of computers that are linked and function together, such as a computer network or computer cluster.
A broad range of industrial and consumer products use computers as control systems. Simple special-purpose devices like microwave ovens and remote controls are included, as are factory devices like industrial robots and computer-aided design, as well as general-purpose devices like personal computers and mobile devices like smartphones. Computers power the Internet, which links billions of other computers and users.
Early computers were meant to be used only for calculations. Simple manual instruments like the abacus have aided people in doing calculations since ancient times. Early in the Industrial Revolution, some mechanical devices were built to automate long, tedious tasks, such as guiding patterns for looms. More sophisticated electrical machines did specialized analog calculations in the early 20th century. The first digital electronic calculating machines were developed during World War II. The first semiconductor transistors in the late 1940s were followed by the silicon-based MOSFET (MOS transistor) and monolithic integrated circuit chip technologies in the late 1950s, leading to the microprocessor and the microcomputer revolution in the 1970s. The speed, power and versatility of computers have been increasing dramatically ever since then, with transistor counts increasing at a rapid pace (as predicted by Moore's law), leading to the Digital Revolution during the late 20th to early 21st centuries.
This document discusses two-dimensional arrays. It explains that two-dimensional arrays consist of rows and columns, and can be initialized when declared by listing values in braces separated by commas. Elements are accessed using subscripts for the row and column, such as arrayName[row][column]. Nested for loops are commonly used to traverse each element. Arrays can have more than two dimensions but are rarely used with more than two. Common errors include exceeding the array bounds or forgetting to initialize elements.
The document discusses arrays in C++. It defines arrays as collections of data of the same type used to store multiple values. Arrays are declared with a type followed by brackets containing the number of elements, such as int score[5]. Indexed elements can be accessed using subscript notation like score[0]. Arrays can be passed to functions as arguments. Functions can process the entire array but do not know its size, so a size parameter is typically included. Arrays cannot be returned from functions.
The document discusses arrays in C++. It defines arrays as collections of data of the same type used to store multiple values. Arrays are declared with a type followed by brackets containing the number of elements, such as int score[5]. Indexed elements can be accessed using subscript notation like score[0]. Arrays can be passed to functions as arguments. Functions can process the entire array but do not know its size, so a size parameter is typically included. Arrays cannot be returned from functions.
This presentation has been made keeping in mind the students of undergraduate and postgraduate level. To keep the facts in a natural form and to display the material in more detail, the help of various books, websites and online medium has been taken. Whatever medium the material or facts have been taken from, an attempt has been made by the presenter to give their reference at the end.
In the seventh century, the rule of Sindh state was in the hands of Rai dynasty. We know the names of five kings of this dynasty- Rai Divji, Rai Singhras, Rai Sahasi, Rai Sihras II and Rai Sahasi II. During the time of Rai Sihras II, Nimruz of Persia attacked Sindh and killed him. After the return of the Persians, Rai Sahasi II became the king. After killing him, one of his Brahmin ministers named Chach took over the throne. He married the widow of Rai Sahasi and became the ruler of entire Sindh by suppressing the rebellions of the governors.
Adam Grant: Transforming Work Culture Through Organizational PsychologyPrachi Shah
This presentation explores the groundbreaking work of Adam Grant, renowned organizational psychologist and bestselling author. It highlights his key theories on giving, motivation, leadership, and workplace dynamics that have revolutionized how organizations think about productivity, collaboration, and employee well-being. Ideal for students, HR professionals, and leadership enthusiasts, this deck includes insights from his major works like Give and Take, Originals, and Think Again, along with interactive elements for enhanced engagement.
Happy Summer Everyone. This is also timeless for future viewing.
You all have been upgraded from ‘Guest’ Students to ‘Graduate’ Students. Do Welcome Back. For new guests, please see our free weekly workshops from Spring ‘25’
Blessings, Love, and Namaste’.
Do Welcome to Summer ‘25’ for LDMMIA.
TY, for surviving our First Season/Term of our Reiki Yoga Workshops. These presentations/workshop are designed for your energy wellness.
Also, professional expansion for Summer ‘25’. All updates will be uploaded here and digital notes within our Merch Shop. (I am Completely, using the suggestions of AI for my Biz style. Its spooky accurate. So far, AI has been very helpful for office and studio admin. I even updated my AI avatars. Similar to my SL Meta avatar.)
Do take Care of yourselves. This is only a Bonus Checkin. The Next Workshop will be Lecture/Session 8. I will complete by Friday.
https://ldm-mia.creator-spring.com/
How to Configure Add to Cart in Odoo 18 WebsiteCeline George
In this slide, we’ll discuss how to configure the Add to Cart functionality in the Odoo 18 Website. This feature enhances the shopping experience by offering three flexible options: Stay on the Product Page, Go to the Cart, or Let the User Decide through a dialog box.
Christian education is an important element in forming moral values, ethical Behaviour and
promoting social unity, especially in diverse nations like in the Caribbean. This study examined
the impact of Christian education on the moral growth in the Caribbean, characterized by
significant Christian denomination, like the Orthodox, Catholic, Methodist, Lutheran and
Pentecostal. Acknowledging the historical and social intricacies in the Caribbean, this study
tends to understand the way in which Christian education mold ethical decision making, influence interpersonal relationships and promote communal values. These studies’ uses, qualitative and quantitative research method to conduct semi-structured interviews for twenty
(25) Church respondents which cut across different age groups and genders in the Caribbean. A
thematic analysis was utilized to identify recurring themes related to ethical Behaviour, communal values and moral development. The study analyses the three objectives of the study:
how Christian education Mold’s ethical Behaviour and enhance communal values, the role of
Christian educating in promoting ecumenism and the effect of Christian education on moral
development. Moreover, the findings show that Christian education serves as a fundamental role
for personal moral evaluation, instilling a well-structured moral value, promoting good
Behaviour and communal responsibility such as integrity, compassion, love and respect. However, the study also highlighted challenges including biases in Christian teachings, exclusivity and misconceptions about certain practices, which impede the actualization of
Rose Cultivation Practices by Kushal Lamichhane.pdfkushallamichhame
This includes the overall cultivation practices of Rose prepared by:
Kushal Lamichhane (AKL)
Instructor
Shree Gandhi Adarsha Secondary School
Kageshowri Manohara-09, Kathmandu, Nepal
Dashboard Overview in Odoo 18 - Odoo SlidesCeline George
Odoo 18 introduces significant enhancements to its dashboard functionalities, offering users a more intuitive and customizable experience. The updated dashboards provide real-time insights into various business operations, enabling informed decision-making.
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...EduSkills OECD
Deborah Nusche, Senior Analyst, OECD presents at the OECD webinar 'Trends Spotting: Strategic foresight for tomorrow’s education systems' on 5 June 2025. You can check out the webinar on the website https://oecdedutoday.com/webinars/ Other speakers included: Deborah Nusche, Senior Analyst, OECD
Sophie Howe, Future Governance Adviser at the School of International Futures, first Future Generations Commissioner for Wales (2016-2023)
Davina Marie, Interdisciplinary Lead, Queens College London
Thomas Jørgensen, Director for Policy Coordination and Foresight at European University Association
Smart Borrowing: Everything You Need to Know About Short Term Loans in Indiafincrifcontent
Short term loans in India are becoming a go-to financial solution for individuals needing quick access to funds without long-term commitments. With fast approval, minimal documentation, and flexible tenures, these loans are ideal for handling emergencies, unexpected bills, or short-term goals. Understanding key aspects like short term loan features, eligibility, required documentation, and how to apply for a short term loan can help borrowers make informed decisions. Whether you're salaried or self-employed, short term loans offer convenience and speed. This guide walks you through the essentials so you can secure the right loan at the right time.
POS Reporting in Odoo 18 - Odoo 18 SlidesCeline George
To view all the available reports in Point of Sale, navigate to Point of Sale > Reporting. In this section, you will find detailed reports such as the Orders Report, Sales Details Report, and Session Report, as shown below.
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptxArshad Shaikh
Diptera, commonly known as flies, is a large and diverse order of insects that includes mosquitoes, midges, gnats, and horseflies. Characterized by a single pair of wings (hindwings are modified into balancing organs called halteres), Diptera are found in almost every environment and play important roles in ecosystems as pollinators, decomposers, and food sources. Some species, however, are significant pests and disease vectors, transmitting diseases like malaria, dengue, and Zika virus.
RE-LIVE THE EUPHORIA!!!!
The Quiz club of PSGCAS brings to you a fun-filled breezy general quiz set from numismatics to sports to pop culture.
Re-live the Euphoria!!!
QM: Eiraiezhil R K,
BA Economics (2022-25),
The Quiz club of PSGCAS
Search Engine Optimization (SEO) for Website SuccessMuneeb Rana
Unlock the essentials of Search Engine Optimization (SEO) with this concise, visually driven PowerPoint. Inside you’ll find:
✅ Clear definitions and core concepts of SEO
✅ A breakdown of On‑Page, Off‑Page, and Technical SEO
✅ Actionable best‑practice checklists for keyword research, content optimization, and link building
✅ A quick‑start toolkit featuring Google Analytics, Search Console, Ahrefs, SEMrush, and Moz
✅ Real‑world case study demonstrating a 70 % organic‑traffic lift
✅ Common challenges, algorithm updates, and tips for long‑term success
Whether you’re a digital‑marketing student, small‑business owner, or PR professional, this deck will help you boost visibility, build credibility, and drive sustainable traffic. Download, share, and start optimizing today!
Search Engine Optimization (SEO) for Website SuccessMuneeb Rana
Ad
C++ How to Program Early Objects Version 9th Edition Deitel Solutions Manual
1. C++ How to Program Early Objects Version 9th
Edition Deitel Solutions Manual download
https://testbankfan.com/product/c-how-to-program-early-objects-
version-9th-edition-deitel-solutions-manual/
Explore and download more test bank or solution manual
at testbankfan.com
2. We believe these products will be a great fit for you. Click
the link to download now, or visit testbankfan.com
to discover even more!
C++ How to Program Early Objects Version 9th Edition
Deitel Test Bank
https://testbankfan.com/product/c-how-to-program-early-objects-
version-9th-edition-deitel-test-bank/
C++ How to Program Late Objects Version 7th Edition Deitel
Test Bank
https://testbankfan.com/product/c-how-to-program-late-objects-
version-7th-edition-deitel-test-bank/
Java How to Program Early Objects 11th Edition Deitel
Solutions Manual
https://testbankfan.com/product/java-how-to-program-early-
objects-11th-edition-deitel-solutions-manual/
Personal Finance 13th Edition Garman Solutions Manual
https://testbankfan.com/product/personal-finance-13th-edition-garman-
solutions-manual/
3. Marketing of High Technology Products and Innovations 3rd
Edition Mohr Solutions Manual
https://testbankfan.com/product/marketing-of-high-technology-products-
and-innovations-3rd-edition-mohr-solutions-manual/
Consumer Behavior Building Marketing Strategy 13th Edition
Mothersbaugh Test Bank
https://testbankfan.com/product/consumer-behavior-building-marketing-
strategy-13th-edition-mothersbaugh-test-bank/
Basic Clinical Lab Competencies For Respiratory Care 5th
Edition White Test Bank
https://testbankfan.com/product/basic-clinical-lab-competencies-for-
respiratory-care-5th-edition-white-test-bank/
Essentials of Business Communication 10th Edition Guffey
Test Bank
https://testbankfan.com/product/essentials-of-business-
communication-10th-edition-guffey-test-bank/
Impact A Guide to Business Communication Canadian 9th
Edition Northey Solutions Manual
https://testbankfan.com/product/impact-a-guide-to-business-
communication-canadian-9th-edition-northey-solutions-manual/
4. Human Resource Management 11th Edition Rue Solutions
Manual
https://testbankfan.com/product/human-resource-management-11th-
edition-rue-solutions-manual/
5. 7
Class Templates array and
vector; Catching
Exceptions
Now go, write it
before them in a table,
and note it in a book.
—Isaiah 30:8
Begin at the beginning, … and
go on till you come to the end:
then stop.
—Lewis Carroll
To go beyond is as
wrong as to fall short.
—Confucius
O b j e c t i v e s
In this chapter you’ll:
■ Use C++ Standard Library
class template array—a
fixed-size collection of
related data items.
■ Use arrays to store, sort
and search lists and tables of
values.
■ Declare arrays, initialize
arrays and refer to the
elements of arrays.
■ Use the range-based for
statement.
■ Pass arrays to functions.
■ Declare and manipulate
multidimensional arrays.
■ Use C++ Standard Library
class template vector—a
variable-size collection of
related data items.
cpphtp9_07.fm Page 1 Thursday, June 6, 2013 12:12 PM
6. 2 Chapter 7 Class Templates array and vector; Catching Exceptions
Self-Review Exercises
7.1 (Fill in the Blanks) Answer each of the following:
a) Lists and tables of values can be stored in or .
ANS: arrays, vectors.
b) An array’s elements are related by the fact that they have the same and .
ANS: array name, type.
c) The number used to refer to a particular element of an array is called its .
ANS: subscript or index.
d) A(n) should be used to declare the size of an array, because it eliminates magic
numbers.
ANS: constant variable.
e) The process of placing the elements of an array in order is called the array.
ANS: sorting.
f) The process of determining if an array contains a particular key value is called
the array.
ANS: searching.
g) An array that uses two subscripts is referred to as a(n) array.
ANS: two-dimensional.
7.2 (True or False) State whether the following are true or false. If the answer is false, explain why.
a) A given array can store many different types of values.
ANS: False. An array can store only values of the same type.
b) An array subscript should normally be of data type float.
ANS: False. An array subscript should be an integer or an integer expression.
c) If there are fewer initializers in an initializer list than the number of elements in the ar-
ray, the remaining elements are initialized to the last value in the initializer list.
ANS: False. The remaining elements are initialized to zero.
d) It’s an error if an initializer list has more initializers than there are elements in the array.
ANS: True.
7.3 (Write C++ Statements) Write one or more statements that perform the following tasks for
an array called fractions:
a) Define a constant variable arraySize to represent the size of an array and initialize it to 10.
ANS: const size_t arraySize = 10;
b) Declare an array with arraySize elements of type double, and initialize the elements to 0.
ANS: array< double, arraySize > fractions = { 0.0 };
c) Name the fourth element of the array.
ANS: fractions[ 3 ]
d) Refer to array element 4.
ANS: fractions[ 4 ]
e) Assign the value 1.667 to array element 9.
ANS: fractions[ 9 ] = 1.667;
f) Assign the value 3.333 to the seventh element of the array.
ANS: fractions[ 6 ] = 3.333;
g) Display array elements 6 and 9 with two digits of precision to the right of the decimal
point, and show the output that is actually displayed on the screen.
ANS: cout << fixed << setprecision( 2 );
cout << fractions[ 6 ] << ' ' << fractions[ 9 ] << endl;
Output: 3.33 1.67
cpphtp9_07.fm Page 2 Thursday, June 6, 2013 12:12 PM
7. Self-Review Exercises 3
h) Display all the array elements using a counter-controlled for statement. Define the in-
teger variable i as a control variable for the loop. Show the output.
ANS: for ( size_t i = 0; i < fractions.size(); ++i )
cout << "fractions[" << i << "] = " << fractions[ i ] << endl;
Output:
fractions[ 0 ] = 0.0
fractions[ 1 ] = 0.0
fractions[ 2 ] = 0.0
fractions[ 3 ] = 0.0
fractions[ 4 ] = 0.0
fractions[ 5 ] = 0.0
fractions[ 6 ] = 3.333
fractions[ 7 ] = 0.0
fractions[ 8 ] = 0.0
fractions[ 9 ] = 1.667
i) Display all the array elements separated by spaces using a range-based for statement.
ANS: for ( double element : fractions )
cout << element << ' ';
7.4 (Two-Dimensional array Questions) Answer the following questions regarding an array
called table:
a) Declare the array to store int values and to have 3 rows and 3 columns. Assume that
the constant variable arraySize has been defined to be 3.
ANS: array< array< int, arraySize >, arraySize > table;
b) How many elements does the array contain?
ANS: Nine.
c) Use a counter-controlled for statement to initialize each element of the array to the
sum of its subscripts.
ANS: for ( size_t row = 0; row < table.size(); ++row )
for ( size_t column = 0; column < table[ row ].size(); ++column )
table[ row ][ column ] = row + column;
d) Write a nested for statement that displays the values of each element of array table in
tabular format with 3 rows and 3 columns. Each row and column should be labeled
with the row or column number. Assume that the array was initialized with an initial-
izer list containing the values from 1 through 9 in order. Show the output.
ANS: cout << " [0] [1] [2]" << endl;
for ( size_t i = 0; i < arraySize; ++i ) {
cout << '[' << i << "] ";
for ( size_t j = 0; j < arraySize; ++j )
cout << setw( 3 ) << table[ i ][ j ] << " ";
cout << endl;
}
Output:
[0] [1] [2]
[0] 1 2 3
[1] 4 5 6
[2] 7 8 9
cpphtp9_07.fm Page 3 Thursday, June 6, 2013 12:12 PM
8. 4 Chapter 7 Class Templates array and vector; Catching Exceptions
7.5 (Find the Error) Find the error in each of the following program segments and correct the error:
a) #include <iostream>;
ANS: Error: Semicolon at end of #include preprocessing directive.
Correction: Eliminate semicolon.
b) arraySize = 10; // arraySize was declared const
ANS: Error: Assigning a value to a constant variable using an assignment statement.
Correction: Initialize the constant variable in a const size_t arraySize declaration.
c) Assume that array< int, 10 > b = {};
for ( size_t i = 0; i <= b.size(); ++i )
b[ i ] = 1;
ANS: Error: Referencing an array element outside the bounds of the array (b[10]).
Correction: Change the loop-continuation condition to use < rather than <=.
d) Assume that a is a two-dimensional array of int values with two rows and two columns:
a[ 1, 1 ] = 5;
ANS: Error: array subscripting done incorrectly.
Correction: Change the statement to a[ 1 ][ 1 ] = 5;
Exercises
NOTE: Solutions to the programming exercises are located in the ch07solutions folder.
7.6 (Fill in the Blanks) Fill in the blanks in each of the following:
a) The names of the four elements of array p are , , and
.
ANS: p[ 0 ], p[ 1 ], p[ 2 ], p[ 3 ]
b) Naming an array, stating its type and specifying the number of elements in the array
is called the array.
ANS: declaring.
c) When accessing an array element, by convention, the first subscript in a two-dimen-
sional array identifies an element’s and the second subscript identifies an el-
ement’s .
ANS: row, column.
d) An m-by-n array contains rows, columns and elements.
ANS: m, n, m × n.
e) The name of the element in row 3 and column 5 of array d is .
ANS: d[ 3 ][ 5 ].
7.7 (True or False) Determine whether each of the following is true or false. If false, explain why.
a) To refer to a particular location or element within an array, we specify the name of the
array and the value of the particular element.
ANS: False. The name of the array and the subscript of the array are specified.
b) An array definition reserves space for an array.
ANS: True.
c) To indicate reserve 100 locations for integer array p, you write
p[ 100 ];
ANS: False. A data type must be specified. An example of a correct definition would be:
array< int, 100 > p;
d) A for statement must be used to initialize the elements of a 15-element array to zero.
ANS: False. The array can be initialized in a declaration with a member initializer list.
cpphtp9_07.fm Page 4 Thursday, June 6, 2013 12:12 PM
9. Exercises 5
e) Nested for statements must be used to total the elements of a two-dimensional array.
ANS: False. The sum of the elements can be obtained without for statements, with one for
statement, three for statements, etc.
7.8 (Write C++ Statements) Write C++ statements to accomplish each of the following:
a) Display the value of element 6 of character array alphabet.
ANS: cout << alphabet[ 6 ] << 'n';
b) Input a value into element 4 of one-dimensional floating-point array grades.
ANS: cin >> grades[ 4 ];
c) Initialize each of the 5 elements of one-dimensional integer array values to 8.
ANS: int values[ 5 ] = { 8, 8, 8, 8, 8 };
or
int values[ 5 ];
for ( int j = 0; j < 5; ++j )
values[ j ] = 8;
or
int values[ 5 ];
for ( int &element : values )
element = 8;
d) Total and display the elements of floating-point array temperatures of 100 elements.
ANS: double total = 0.0;
for ( int k = 0; k < 100; ++k )
{
total += temperatures[ k ];
cout << temperatures[ k ] << 'n';
} // end for
or
double total = 0.0;
for ( int temp : temperatures )
{
total += temp;
cout << temp << 'n';
} // end for
e) Copy array a into the first portion of array b. Assume that both arrays contain doubles
and that arrays a and b have 11 and 34 elements, respectively.
ANS: for ( int i = 0; i < 11; ++i )
b[ i ] = a[ i ];
f) Determine and display the smallest and largest values contained in 99-element floating-
point array w.
ANS: double smallest = w[ 0 ];
double largest = w[ 0 ];
for ( int j = 1; j < 99; ++j )
{
if ( w[ j ] < smallest )
smallest = w[ j ];
else if ( w[ j ] > largest )
largest = w[ j ];
} // end for
cout << smallest << ' ' << largest;
cpphtp9_07.fm Page 5 Thursday, June 6, 2013 12:12 PM
10. 6 Chapter 7 Class Templates array and vector; Catching Exceptions
or you could write the loop as
for ( double element : w )
{
if ( element < smallest )
smallest = element;
else if ( element > largest )
largest = element;
} // end for
7.9 (Two-Dimensional array Questions) Consider a 2-by-3 integer array t.
a) Write a declaration for t.
ANS: array< array< int, 3 >, 2 > t;
b) How many rows does t have?
ANS: 2
c) How many columns does t have?
ANS: 3
d) How many elements does t have?
ANS: 6
e) Write the names of all the elements in row 1 of t.
ANS: t[ 1 ][ 0 ], t[ 1 ][ 1 ], t[ 1 ][ 2 ]
f) Write the names of all the elements in column 2 of t.
ANS: t[ 0 ][ 2 ], t[ 1 ][ 2 ]
g) Write a statement that sets the element of t in the first row and second column to zero.
ANS: t[ 0 ][ 1 ] = 0;
h) Write a series of statements that initialize each element of t to zero. Do not use a loop.
ANS:
t[ 0 ][ 0 ] = 0;
t[ 0 ][ 1 ] = 0;
t[ 0 ][ 2 ] = 0;
t[ 1 ][ 0 ] = 0;
t[ 1 ][ 1 ] = 0;
t[ 1 ][ 2 ] = 0;
i) Write a nested counter-controlled for statement that initializes each element of t to zero.
ANS:
for ( int i = 0; i < 2; ++i )
{
for ( int j = 0; j < 3; ++j )
t[ i ][ j ] = 0;
} // end for
j) Write a nested range-based for statement that initializes each element of t to zero.
ANS:
for ( auto &row : t )
{
for ( auto &element : row )
element = 0;
} // end for
cpphtp9_07.fm Page 6 Thursday, June 6, 2013 12:12 PM
11. Exercises 7
k) Write a statement that inputs the values for the elements of t from the keyboard.
ANS:
for ( int i = 0; i < 2; ++i )
{
for ( int j = 0; j < 3; ++j )
cin >> t[ i ][ j ];
} // end for
l) Write a series of statements that determine and display the smallest value in array t.
ANS:
int smallest = t[ 0 ][ 0 ];
for ( int i = 0; i < 2; ++i )
{
for ( int j = 0; j < 3; ++j )
{
if ( t[ i ][ j ] < smallest )
smallest = t[ i ][ j ];
} // end for
} // end for
cout << smallest;
m) Write a statement that displays the elements in row 0 of t.
ANS: cout << t[ 0 ][ 0 ] << ' ' << t[ 0 ][ 1 ] << ' ' << t[ 0 ][ 2 ] << 'n';
n) Write a statement that totals the elements in column 2 of t.
ANS: int total = t[ 0 ][ 2 ] + t[ 1 ][ 2 ];
o) Write a series of statements that prints the array t in neat, tabular format. List the column
subscripts as headings across the top and list the row subscripts at the left of each row.
ANS:
cout << " 0 1 2n";
for ( int r = 0; r < 2; ++r )
{
cout << r << ' ';
for ( int c = 0; c < 3; ++c )
cout << t[ r ][ c ] << " ";
cout << 'n';
} // end for
7.11 (One-Dimensional array Questions) Write single statements that perform the following
one-dimensional array operations:
a) Initialize the 10 elements of integer array counts to zero.
ANS: int counts[ 10 ] = {};
b) Add 1 to each of the 15 elements of integer array bonus.
ANS:
for ( int i = 0; i < 15; ++i )
++bonus[ i ];
or
for ( int &element : bonus )
++element;
cpphtp9_07.fm Page 7 Thursday, June 6, 2013 12:12 PM
12. 8 Chapter 7 Class Templates array and vector; Catching Exceptions
c) Read 12 values for the array of doubles named monthlyTemperatures from the keyboard.
ANS:
for ( int p = 0; p < 12; ++p )
cin >> monthlyTemperatures[ p ];
or
for ( int &element : monthlyTemperatures )
cin >> element;
d) Print the 5 values of integer array bestScores in column format.
ANS:
for ( int u = 0; u < 5; ++u )
cout << bestScores[ u ] << 't';
or
for ( int element : bestScores )
cout << element << 't';
7.12 (Find the Errors) Find the error(s) in each of the following statements:
a) Assume that a is an array of three ints.
cout << a[ 1 ] << " " << a[ 2 ] << " " << a[ 3 ] << endl;
ANS: a[ 3 ] is not a valid location in the array. a[ 2 ] is the last valid location.
b) array< double, 3 > f = { 1.1, 10.01, 100.001, 1000.0001 };
ANS: Too many initializers in the initializer list. Only 1, 2, or 3 values may be provided in
the initializer list.
c) Assume that d is an array of doubles with two rows and 10 columns.
d[ 1, 9 ] = 2.345;
ANS: Incorrect syntax array element access. d[ 1 ][ 9 ] is the correct syntax.
7.15 (Two-Dimensional array Initialization) Label the elements of a 3-by-5 two-dimensional
array sales to indicate the order in which they’re set to zero by the following program segment:
for ( size_t row = 0; row < sales.size(); ++row )
for ( size_t column = 0; column < sales[ row ].size(); ++column )
sales[ row ][ column ] = 0;
ANS: sales[ 0 ][ 0 ], sales[ 0 ][ 1 ], sales[ 0 ][ 2 ], sales[ 0 ][ 3 ],
sales[ 0 ][ 4 ], sales[ 1 ][ 0 ], sales[ 1 ][ 1 ], sales[ 1 ][ 2 ],
sales[ 1 ][ 3 ], sales[ 1 ][ 4 ], sales[ 2 ][ 0 ], sales[ 2 ][ 1 ],
sales[ 2 ][ 2 ], sales[ 2 ][ 3 ], sales[ 2 ][ 4 ]
7.17 (What Does This Code Do?) What does the following program do?
1 // Ex. 7.17: Ex07_17.cpp
2 // What does this program do?
3 #include <iostream>
4 #include <array>
5 using namespace std;
6
7 const size_t arraySize = 10;
8 int whatIsThis( const array< int, arraySize > &, size_t ); // prototype
9
10 int main()
11 {
12 array< int, arraySize > a = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
13
cpphtp9_07.fm Page 8 Thursday, June 6, 2013 12:12 PM
13. Exercises 9
ANS: This program sums array elements. The output would be
7.20 (What Does This Code Do?) What does the following program do?
ANS: This program prints array elements in reverse order. The output would be
14 int result = whatIsThis( a, arraySize );
15
16 cout << "Result is " << result << endl;
17 } // end main
18
19 // What does this function do?
20 int whatIsThis( const array< int, arraySize > &b, size_t size )
21 {
22 if ( size == 1 ) // base case
23 return b[ 0 ];
24 else // recursive step
25 return b[ size - 1 ] + whatIsThis( b, size - 1 );
26 } // end function whatIsThis
Result is 55
1 // Ex. 7.20: Ex07_20.cpp
2 // What does this program do?
3 #include <iostream>
4 #include <array>
5 using namespace std;
6
7 const size_t arraySize = 10;
8 void someFunction( const array< int, arraySize > &, size_t ); // prototype
9
10 int main()
11 {
12 array< int, arraySize > a = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
13
14 cout << "The values in the array are:" << endl;
15 someFunction( a, 0 );
16 cout << endl;
17 } // end main
18
19 // What does this function do?
20 void someFunction( const array< int, arraySize > &b, size_t current )
21 {
22 if ( current < b.size() )
23 {
24 someFunction( b, current + 1 );
25 cout << b[ current ] << " ";
26 } // end if
27 } // end function someFunction
The values in the array are:
10 9 8 7 6 5 4 3 2 1
cpphtp9_07.fm Page 9 Thursday, June 6, 2013 12:12 PM
15. For a long time the major wrestled with pen and paper before he
composed a letter to his satisfaction. The contents we already know,
and how they dashed Ted’s hopes to the ground. The missive sealed,
the colonel observed:
“I suppose we can trace Havildar Ambar Singh? His evidence will
be wanted.”
Ambar Singh had returned to his home in Merwar. The 193rd had
been disbanded, and the few who remained loyal had been drafted
into the newly-raised corps. But the havildar was not in a fit
condition to endure the strain of a campaign, so he had gone home
to recruit his health. However, they thought they knew where to find
him.
“We can hold no enquiry,” said the major, “until Delhi has fallen
and Ted is free again, and the case ought certainly to be tried before
officers other than those of the 193rd. We are hardly impartial, our
sympathies being with Ted. Luckily Dwarika Rai is still here, and he
may throw some light on the subject.”
For Dwarika Rai, the fourth survivor of Lowthian’s handful, had
been promoted to the rank of havildar, and was now employed in
drilling the raw material and teaching them the beauties of the
goose-step.
“I’ll drive Ethel home,” said the colonel, “and come back
presently with Sir Arthur, and we’ll examine Dwarika Rai.”
When the Woodburns had gone, Tynan returned to dine with
Munro and Leigh. The colonel and the deputy-commissioner entered
as the officers were smoking after their meal, and Dwarika Rai was
sent for.
The Rajput entered the room, and in the act of saluting started
back on beholding Tynan, who also gave a start and rose to his feet.
“Why!” he gasped, for no warning had been given him, “what is
he doing here? I thought only Russell and I and Ambar Singh were
16. saved.”
Dwarika Rai still stood open-mouthed as though he had seen a
ghost.
“He also was saved,” explained the major. “Dwarika Rai, it is
indeed Tynan Sahib.”
“I am rejoiced to see him, for I thought he was dead,” said the
soldier simply.
“We wish to recall to your memory some of the events that took
place in the fortress when you were attacked,” Munro began. “Didst
thou notice the part taken by Pir Baksh during the fighting? Was he
a ringleader?”
“Indeed, sahib, I’m not sure. Russell Sahib and Ambar Singh
considered him so, but I could not help thinking that he wished us
well. He seemed to fire without aiming, and never hit anyone, and I
verily believe that he wished to save our lives. But the others would
not trust him, and perhaps they were right.”
Munro and the colonel looked at one another.
“Your opinion, then, was that he had been forced to rebel?”
“I thought it might be so, Colonel Sahib; in fact, once after the
firing had been hot, Bisesar Singh whispered to me that the heart of
Pir Baksh was not in the affair. When I asked him why, he replied
that the subadar had covered him with his musket, and then winked
at him and fired high. Yet sometimes he appeared to lead the dogs;
but perhaps that was to divert suspicion, perhaps he had to feign to
be as faithless as themselves whenever they were watching him.”
“That is probable enough,” Sir Arthur whispered to his
colleagues. “Under the circumstances I can quite understand a man
doing that.”
17. “Yes, so can I,” the colonel agreed. “Ted and Ambar Singh might
easily have been mistaken, and have misjudged him.”
When Leigh had finished recording the evidence, Major Munro
asked Tynan to retire for a few moments. He then questioned
Dwarika Rai as to who laid the powder train.
“Russell Sahib, I think,” was the reply.
“Did you notice Tynan Sahib enter the magazine?”
“Yes, sahib, before they battered the door in. He was away some
time, and I wondered why.”
The major turned to his colleagues and observed in English:
“Tynan’s tale is true so far;” and the others nodded assent.
“Tell us, then,” asked Leigh, “is it true that Tynan Sahib tried to
prevent Russell Sahib firing the train?”
“In short,” said the deputy-commissioner, “did Ensign Tynan act
as an officer or as a coward?”
“Nay,” the man earnestly replied, “I do not like Tynan Sahib
overmuch, greatly preferring Russell Sahib, but he was not a
coward. He was very much excited, as we all were, and he tried to
snatch the candle from his comrade’s hand. But I thought they were
contesting who should light the train, as if it matters who did it. The
important thing is that it was done.”
The Englishmen whispered together, and presently Munro said:
“You may go, Dwarika Rai.”
“I must say,” began Colonel Woodburn, “his evidence confirms
Tynan’s in every important respect. I’m afraid we’ve done the lad a
serious injustice.”
“Yet his account differs from Russell’s in point of actual fact, not
merely in the interpretation put upon facts,” the deputy-
18. commissioner argued.
“Ted was probably excited, and the shock may have temporarily
affected his memory,” Leigh suggested.
“Ted is certainly to blame,” said Munro. “He may easily have
mistaken Tynan’s excitement for terror.”
Said Leigh:
“We forget. Ted Russell never accused Tynan of cowardice. That
was Ambar Singh.”
“But Ted did not deny it,” said Munro, “and he ought to have
done so. But when asked, he did state implicitly that the suggestion
was wholly his. Either he or Tynan is lying. We must have a full
enquiry, and meanwhile Tynan must be treated as ‘not guilty’ of
cowardice.”
“My humble opinion,” said Leigh thoughtfully, “is that I’d believe
Ted Russell’s word against Tynan’s oath. I don’t understand it.”
Had he seen Dwarika Rai’s cheerful nod, as, returning to the
men’s quarters, he passed Ensign Tynan, he might have understood
it better.
The havildar was a brave and loyal fellow, but he was a Hindu
with a Hindu’s respect for truth. Tynan, returning after the first
interview with his superior officers, had almost run into Dwarika Rai
as he entered the men’s quarters. The surprise was great on both
sides.
“I’m done for,” was the first thought of our unscrupulous ensign.
“This fellow will knock my tale on the head.” His next was: “Why not
bribe him to confirm what I have said?”
No one was looking on; he drew the Rajput aside into the
orderly-room from which he had just emerged, and offered him a big
bribe to bear false witness. The sepoy was greatly in want of money.
19. In common with so many others of his class, the fields owned and
tilled by many generations of his forbears were hopelessly
mortgaged to the money-lending parasites, the curse of Hindustan.
Here a sum was offered that might redeem them, and save his
family from disgrace and ruin.
He hesitated. Would his evidence injure Russell Sahib? Tynan
assured him it would not, he simply wanted a share of the credit for
himself; and the Rajput consented. Tynan warned him what
questions would be asked, and coached him to give suitable replies.
He cunningly advised him not to appear too eager, and not to
pretend to know too much, the chief points being that Pir Baksh was
to be absolved, and that he, Tynan, was to have a share of the
credit attached to the destruction of the magazine. The sharp-witted
Hindu quickly understood his part, and improved upon his teacher’s
suggestions.
“It will do Russell Sahib no harm,” he reflected.
Tynan then warned him that when they should meet in the room
they were both to express the utmost amazement, and Dwarika Rai
nodded in acquiescence.
He thoroughly earned his pay, as Tynan discovered when he
rejoined his comrades.
20. CHAPTER XX
An Adventure on the Ridge
The attacks on the Ridge outposts had become less frequent and
less dangerous, though the cannonade was as brisk as ever.
Early on the morning following the receipt of the amazing news
from Aurungpore, Ted Russell of the Hindu Rao picket was roughly
aroused from slumber. All was hurry and scurry as company after
company of the Guides and Rifles ran to the assistance of the
Gurkhas, who were bearing the brunt of a cleverly-designed attack
by ten times their number. Jim, Alec, and Ted raced to the scene of
action, arriving just in time to pursue the already defeated foe.
“Charlie means to have that rag,” Ted panted to his chum, as
they raced side by side.
Shouting, “Follow me, lads!” Dorricot had made a dash for the
colours of a rebel regiment, and was rapidly overhauling the flying
standard-bearer, a score of mixed-up Rifles, Guides, and Gurkhas
following as best they could. The fight and pursuit were being
carried on over a great extent of ground, and only the few in
Dorricot’s immediate neighbourhood knew what was taking place.
Seeing that the pursuers were so few in number, a large body of the
enemy interposed between the officer and his followers, barring
their progress. Charles Dorricot broke through, cut down the colour-
bearer, grasped the standard, beat back his assailants, and for a few
moments cleared a space around him. But what could one man do
against so many? Before help could come Dorricot was beaten to his
knees, sorely wounded, though still attempting to defend himself.
21. He collapsed, a sword-thrust through his breast, just as Corporal
Thompson, a huge rifleman, forced his way through the mob by
sheer strength and weight and judicious use of the butt-end. In the
wake of the corporal came Motiram Rana, a Gurkha, and Hassan Din
of the Guides, but, as they got through, the rebels closed up again
behind them, baffling the efforts of Ted and his men to follow.
Whether their officer was dead or wounded the three knew not; they
meant to guard his body with their own. At bay they stood back to
back—representatives of the three regiments that had held the
Ridge—and, facing them, the rebels snarled like a pack of wolves
around a wounded lion. Those behind pressed on those in front, and
sepoy after sepoy fell before the weapons of the dauntless three, the
Englishman trusting to the butt, the Pathan to the bayonet, and
Motiram Rana, of course, to his patron saint, the kukri. The rifle in
the Gurkha’s left hand was still loaded. Using the weapon as a pistol,
the little man pulled the trigger, and the bullet passed through two
pandies at least. Having now more room, the gigantic Thompson
swung his rifle round and round and up and down like a flail, and
cleared a breathing space. The stock broke into splinters, but before
the mutineers could get in he snatched a musket, cracked the
owner’s head, and the pandies again recoiled.
“He’s down!” Ted gasped. “At ’em, Guides!”
He and Alec with their Guides around them were pushing and
thrusting and smiting their way through the opposing crowd, the
pandies on this portion of the sloping ground having rallied round
their standard. Suddenly the mob bulged in close by where they
fought, as a pricked tennis-ball when squeezed; and amid a babel of
shrill yells and jabberings in an unknown tongue, a lane was opened
up. A Gurkha corporal had passed the word that Dorricot was down,
and, collecting a couple of dozen furious men, had charged at their
head. The vicious kukris flashed and flickered and bit deep, and the
sepoys fell to right and left of that living wedge of Himalayans.
Behind them Ted and Alec, Guides and Riflemen, found their way,
and the sepoys broke and fled.
22. Ted was quickly beside his fallen cousin, and gave a little cry of
joy on finding that Charlie still breathed. The cry was echoed by the
Gurkhas, who started in pursuit now they were assured of their
officer’s safety, but Ted restrained them. Dorricot’s hand still grasped
the colours for whose capture he had risked so much, for which he
might yet have to pay with his life.
Ted signed to the Gurkhas to help him carry back their wounded
officer. Motiram Rana proffered his aid, but Thompson motioned him
back, saying:
“Tha needs carryin’ thysen, Johnny; tha’rt bleedin’ like a stuck
pig.”
Up came Major Reid, bringing his men forward at the double
from another part of the battle-field where the enemy’s rout had
been complete. His face fell as he caught sight of his sorely-stricken
comrade.
“The rash fellow!” exclaimed the commandant. “He had no right
to push the pursuit so far with such a handful. I cannot spare
Dorricot. Carry him gently; and you, Paterson, run and bring a
doctor to the house.”
Right glad was Ted, and hardly less glad were the Gurkhas, when
the doctor promised hope in spite of no fewer than four sword or
bayonet wounds.
“I have not an unwounded officer left, youngster!” exclaimed
Major Reid dolefully. “Would you care to serve with me again?”
“There’s nothing I should like better, sir.” And then the boy
paused. “Except that I should be sorry to leave the Guides.”
“Well, go to Daly; he’s better off for officers than I am, and ask if
he’ll transfer you for a few days.”
Ted obeyed. Permission was granted, and he again found himself
with the Sirmuris.
23. There were scenes in camp of a less tragic nature witnessed daily
by our two ensigns from Aurungpore. The peculiar methods of
fraternizing adopted by the British riflemen and the Asiatics of the
Guide Corps and Sirmur Battalion provided plenty of amusement for
the onlookers. The Gurkhas soon picked up a smattering of English,
and a few began to speak the language fairly well, whilst on the
other hand the English riflemen gave vent to their feelings in words
which they imagined were Hindustani. “Good-morning!” the little
men would say with a cheerful grin; and the riflemen, not to be
outdone, would reply: “Ram Ram, Johnny Gurkha! Ram Ram!”
Mixed groups would gather after any severe fighting to discuss
the conflict and the conduct of the various regiments engaged, amid
roars of laughter at the interpreter’s attempts to translate the
remarks. They were, indeed, the best of comrades; for brave men,
of whatever race or creed, cannot but admire one another.
One evening in early August, Ted and Alec, after a long visit to
poor Dorricot, joined their good friend Jemadar Goria Thapa, who
was sitting on the shady side of the house-fortress watching the
men larking. He gave the new-comers a welcoming grin.
“Good little man is Goria,” whispered Ted. “We may as well sit by
him. Those chaps are enjoying themselves, ain’t they? Ram Ram,
Jemadar Sahib!”
Goria Thapa returned the greeting, and enquired after the health
of his wounded officer and friend.
“He’s doing splendidly, thanks! He must be as strong as a horse
and as fit as a—what’s the native for fiddle, Alec?”
“Dunno; call it a tom-tom. Are you having a good time, Jemadar
Sahib, or do you wish you were back in Nepal?”
Goria Thapa grinned broadly.
“I like it,” said he simply.
24. “Hullo, Paterson!” broke in Claude Boldre, who had just strolled
up. “How’s your cousin, Russell? I came to ask after him.”
“Doing finely considering, thanks! Look at these chaps. They’re
as fond of horse-play as a lot of kids.”
It was certainly an amusing scene, and though the merest
clowning, even this kind of fooling serves to keep men in good spirits
and temper.
The corporal, Thompson, who had carried the wounded Dorricot
out of the fight, stood 6 feet 4½ inches in his stockings, and was
perhaps the biggest man in the Delhi force. The men were sitting
about in groups playing practical jokes, and Thompson caught hold
of Karbir Burathoki, the smallest Gurkha there, a lad under five feet
high, and led him to an open space within sight of the others. He
there offered to teach the Gurkha how to box, and Karbir quickly
entered into the joke. Both pulled off their jackets, and the Gurkha’s
face was entirely hidden by his grin. The difference in build between
the two men was too much for the spectators, who shouted and
yelled—“Go it, little ’un!” “Jump up and ’it ’im in the face!” “Fetch a
step-ladder!” “Now, corpril, go on your knees and give ’im a chanst!”
After a lot of preliminary feinting and puffing and blowing and
striking high above the Gurkha’s head, the giant began to retire
backwards, Karbir following amidst roars of laughter, the Nepalese
spectators being quite as delighted as their English comrades.
At length Thompson caught hold of the little man and held him in
the air, kicking and shrieking in pretended wrath. As the corporal put
the little Himalayan down, he laughingly remarked: “Na, Johnny, tha
con haud me up like if tha wants thee revenge.”
The Gurkha examined him from head to foot.
“Hould the spalpeen up, Johnny, ye scutt!” advised an Irish
corporal. To the astonishment of all, the little man calmly proceeded
to place the giant on his back like a sack of potatoes. Thompson
25. offered no objection, and Karbir was soon staggering from one
group of laughing spectators to another. Suddenly upsetting the
rifleman full length on the ground, he sat on his chest and
proceeded to light his pipe, whereupon the onlookers shrieked.
Thompson arose, tossing the Gurkha from his perch, and the two
strolled back arm in arm, attempting to keep step, and quarrelling
every few yards as to whose pace was at fault.
Reid had come behind the ensign, and was looking on with
twinkling eyes. Noting that Ted appeared astonished at Karbir’s
strength, he observed: “They’re terribly strong are Gurkhas in the
back, loins, and legs.”
When they had settled down again one of the Nepalese
observed:
“This war will soon be over. Jung Bahadur is going to march
down to Lucknow with his army.”
“An’ ’oo the dickens is young Bardoor?” asked a rifleman.
“He is our prime minister and commander-in-chief in Nepal. He
offered to bring an army down to help you English two months ago,
and now the government has accepted his offer.”
“An’ so ’e’s goin’ to wipe out the rebels, eh, all hon ’is own ’ook?”
The Gurkha did not understand all this.
“What chance will those dogs have,” said he, “against ten
thousand Gurkhas? Truly, he will slay them all!”
“Bedad, then,” interrupted an Irishman, “tell him, will ye, wid me
compliments—Privut O’Brien’s compliments—to lave a few fer us.
Sure, we’re wishful to git hould av some av thim Cawnpore and
Lucknow haythen. Tell him to bear that in moind.”
Then the Gurkhas began to speak of their own beloved country
of Nepal, by the mighty snow-clad Himalayas, of its wonderful
26. beauty, and of its unequalled sport and wealth of animal life; and the
Englishmen tried to explain the extent of their empire and the
wonders of London, and told of their mighty ships of war and great
sea-borne commerce. They also related the histories of their
regimental colours, of the recent Crimean War, and of the fights
between Wellington and the French. The Nepalese were very much
interested in all the tales of war, for they also had tattered
regimental colours of which they were very proud, and which had
cost them many lives.[1]
[1] Before the end of the siege Riflemen and Gurkhas spoke of
one another as “brothers”, and at the close of the war the Sirmur
Battalion begged that it might be granted a uniform similar to that
of their brethren of the 60th, the request being willingly granted.
The 2nd Gurkhas are very proud of the little red line on their
facings, and the uniform thus gained at Delhi they wore in London
at King Edward’s Coronation forty-five years later.
By this time the Gurkha hospital was very full. More than half of
those five hundred men had been stricken down, and the Guides
had also suffered severely. And the great city still defied the British
power.
A few more reinforcements were coming in, but no heavy guns
had yet arrived. One or two new Sikh and Mohammedan cavalry
corps and Punjab infantry regiments, recruited from the Sikhs,
Punjabi Mohammedans, Jats, Pathans, and Dogras, as well as the
Kumaon Gurkha Battalion (now the 3rd Gurkhas), were fighting on
our side. The big Sikh horsemen, who were proud of their new
uniform and despised the rebel cavalry, quickly snatched at
opportunities to cover themselves with glory. The “Flamingoes”, as
Hodson’s Horse were called, had not been in camp many days
before they were in action, distinguishing themselves in a way that
none but the very best of troops dare attempt. Faced by a greatly
superior force, Hodson, with supreme confidence in the steadiness
and valour of his men, feigned a retreat, and when he had drawn
the enemy into the open by this manœuvre, the Flamingoes turned
round at his command and charged into the black mass. The foemen
27. hesitated, confused and bewildered; they glanced at the steady line
of stalwart, bearded cavaliers, heard the thunder of the galloping
horses almost upon them, and were routed, broken and scattered
before the oncoming of those determined Sikhs and Pathans.
Though daily witnessing such instances of dash and courage, Ted
Russell marvelled less thereat than at the quiet indifference to peril
displayed by the native servants. These men were not of the fighting
castes: a dozen of them would have fled cringing from the anger of
a single Englishman, Pathan, Sikh, or Gurkha. Yet, in such different
ways is courage shown, they performed without flinching duties
which most Britons would have shrunk from. They would sit at their
work or at their meals in the most exposed places, with bullets
flicking up the dust all round, no more concerned than a bullock
would have been.
To bring meals and provisions to Hindu Rao’s house they were
forced to cross the dangerous “Valley of the Shadow of Death”. Any
soldier who might have to pass this spot would await the opportunity
to dart across; but these mild non-combatants would calmly walk
over, and should any of their number be struck down, would stop to
shed a few tears over the corpse and then resume the even tenour
of their way.
The army before Delhi was absolutely dependent on these
servitors. In that terrible heat the English could not have existed
without them; and yet, it must be sorrowfully confessed, they were
occasionally ill-treated by some of the more churlish and lawless of
those to whose wants they ministered. The boy who bullies at school
remains often enough a bully when he has grown up. Bullies are
generally stupid fellows, and in the eyes of such men one “nigger”
was much the same as another, and the faithful brown servants had
to suffer for the sins of the Cawnpore murderers. There was one
man in particular, a major of the 15th Derajat Infantry, whose
bullying propensities had more than once aroused indignation in the
breasts of Ted’s friends. Fortunately there were not many
Englishmen of his stamp.
28. One day Ted was told off for picket duty with half a dozen men
some distance from the “Sammy” House. When close to his lonely
post his attention was attracted by the strange demeanour of a
group of wild-looking frontiersmen, assembled in a sheltered hollow.
He drew nearer, and perceived to his disgust that a miserable native
servant had been tied up and was being flogged with bamboo rods,
while a white officer looked on approvingly. Ted recognized the man,
and his blood boiled. Taking no account of the difference in rank, he
hastened to the spot, and hotly demanded what the poor fellow had
been doing to deserve such treatment. The major of the Derajats—
for he it was—opened his eyes in amazement, and his face became
convulsed with anger. Controlling his rage he contemptuously asked:
“And who are you, little boy?”
Thereat one or two of the Punjabis laughed.
“I’m in command of this picket, sir, and I can’t allow this where
I’m responsible. Look! the poor beggar is fainting!”
The officer looked round—first at the miserable Hindu, whose
back was a mass of bleeding weals, and then continued to gaze
about him as though in search of someone.
“Where is she?” he asked at length. “I can’t see her.”
“Whom do you mean, sir?” asked Ted in bewilderment.
“Why, your nurse, of course; she’ll be looking for you
everywhere.”
Our ensign’s face flushed, and his temper rose at the insult. He
turned to the Gurkha naik[1].
[1] Corporal.
“Karbir, cut that man loose!”
The little man promptly drew his kukri and cut the thongs. One of
the Panjabis stepped forward and laid his hand on the naik to
29. prevent him. Karbir turned on him like a tiger, with kukri uplifted,
and the Punjabi jumped back. The major could no longer restrain his
anger. He stepped up to Ted and struck him across the mouth with
clenched fist, loosening a couple of teeth and felling the lad to the
ground. Quick as thought Karbir dashed at the Englishman, but Ted,
from the ground, shrieked out just in time:
“Back, Karbir, you must not touch him!” and the little man
reluctantly obeyed. Ted rose, now as white as he had before been
red. The major laughed.
“Consider yourself fortunate, young man, if I take no further
notice of your insolence. Do you know that you have been guilty of
mutiny—rank mutiny—and that I could have you dismissed from the
service? Now, you may go, and explain the loss of your teeth as you
best please. No—stay! I’ve not done with you yet. I’ll teach you the
difference in our rank. Order that corporal of yours to tie up that
beast again, and then command each of your men to give him half a
dozen strokes.”
Ensign Edward Russell cared a deal for his commission, and had
no wish to be broken for disobedience, but this order he would not
obey. His eyes gleamed as he scornfully cried:
“You great detestable brute! Break me if you can! I’d rather lose
my commission as an officer than forget my duty as a gentleman!”
“Did you hear my command?” the major repeated.
Ted was silent. He glanced around, and beheld a tall, bearded
man, whom he had never seen before—a man with stern and
forbidding look, in untidy civilian attire. The major’s glance followed,
and an expression of annoyance came into his face as he noticed the
stranger.
“Well, my good fellow, what do you want here?” he exclaimed.
“I? Oh, I’m just looking round.”
30. “Oh! Then you’d better get back to whatever your business may
be.”
The man was silent for a moment.
“Won’t that lad obey you?” he asked presently.
“No, that I shall not,” Ted asserted firmly, though feeling very
miserable.
“What right have you, lad,” continued the stranger sternly, “to
question your superior officer’s commands? Your business is to
obey.”
“And obey he will,” the major declared with an oath, “or I’ll know
the reason why!”
“That’s right, sir,” agreed the tall man. “Always insist on
obedience from your juniors.”
Ted was becoming nervous and feeling very lonely. Though
assured he was in the right, the boy could not but feel unhappy.
The batteries of the Mori Bastion once more commenced their
horrible work. Round-shot and grape whistled overhead.
“What does it matter to you, young man, whether you obey the
command or not?” asked the tall man harshly. “That bhisti will be
flogged just the same; he won’t benefit by your refusal.”
“No, that he most certainly won’t!” asserted the major with a
repulsive laugh. “Nor will he thank you for your interference.”
“I’m an officer, not a hangman,” said Ted stoutly.
“Well, you will not be an officer long,” declared the major.
The stranger had approached, and now stood by their side.
“If you won’t obey him,” he said in tones of authority, “you must
obey me! I order you to place that man under arrest,” pointing to
31. the major. “Do you hear me, boy?” as Ted hesitated in his
bewilderment.
The major swore furiously. “Who on earth may you be? What do
you mean by this impertinence, you drunken civilian?”
The tall man took not the slightest notice. He looked at the boy
with stern set face, and there was something in his look that
enforced obedience. Still doubtful, but unable to resist the tone of
authority, Ensign Russell stepped towards the bully, saying:
“You must consider yourself under arrest, sir.”
Naik Karbir understood some English, and was attentively
following the course of events. He whispered to his men, and a
couple at once placed themselves, with bayonets fixed, on either
side of the Englishman. The prisoner foamed at the mouth.
“What do you mean by this outrage, you young whipper-
snapper? Take your men away! You’ll repent this, you impertinent
hound!”
Our hero looked towards the stranger, who fixed his eyes on the
boy, but took no further notice. Then the major appealed to his men.
“My lads, drive these Gurkhas away, and take that English cub
prisoner. Kill those little fiends if they resist!”
Nothing loth, ten men of the 15th Derajats sprang forward, and
the Gurkhas closed round their officer. The stranger raised his hand
imperiously.
“Stop, my children! Come back!” cried a shrill voice, that
quavered with fear; and the Punjabis pulled up short and regarded
the speaker with amazement as profound as that of Ted. His new
ally was the native officer of the party, a grizzled Waziri from the
Bannu district.
32. “It is an order, my children; we must obey,” the old man
continued to the wondering sepoys.
Their own subadar and chieftain on the side of the Gurkhas and
of that infidel dog of a bhisti! What could it mean? But most
astounded of all were the major and the ensign.
“What! Ahmed Khan!” exclaimed the bully. “Wilt thou suffer me
to be insulted in this way?”
“What can I do, sahib? It is an order,” the Waziri answered in
troubled tones.
Then the stranger spoke again.
“Ensign, you are on duty here, and here you had better remain. I
relieve you of the prisoner.” Turning to the Waziri subadar he
continued: “Ahmed Khan is thy name?”
The subadar fell on his knees. “It is thy servant’s name, O
Hakim[1]!”
[1] Lord.
“Ahmed Khan, I see that thou dost know me, and therefore thou
wilt obey. I charge thee to escort this officer—thine officer no longer,
whose commands thou must not obey—to the tent of General
Wilson, and there say who sent thee. Also, see that this bhisti is
carried gently to the hospital, and treat him well. It is my command.”
The Waziri salaamed.
A shell whistled overhead and burst some way in front. A second
quickly followed, and splinters flew around.
“This is becoming warm, youngster,” remarked the tall man,
smiling. “Ahmed Khan, begone quickly!”
The subadar whispered to his men, who thereupon glanced
hurriedly, with awe-stricken eyes, at the bearded Englishman, placed
33. two on each side of the prisoner, with bayonets fixed, and gave the
word to march. The escort moved rapidly away, the major too dazed
and cowed to attempt resistance.
The stranger advanced and placed a hand on Ted’s shoulder. His
face was no longer stern and forbidding; it was the face of a great
and good man.
“My lad,” he said kindly, “let this be the last time you disobey
your senior officer. On this occasion you were right No gentleman,
no Christian, could have obeyed his brutal order. But such a case
rarely happens, and you must beware lest you take too much upon
yourself.”
Ted bowed his head. He knew already that he was in the
presence of the greatest and noblest man he had ever seen.
The stranger continued:
“I see you are with the Sirmur Battalion. I have heard of their
glorious deeds.”
Ted, full of the subject, and more at his ease now, poured forth
for five minutes an account of the valour displayed by Rifles, Guides,
and Gurkhas, then stopped, ashamed at having spoken so much.
But, moved thereto by the kind expression of interest in the man’s
face, he added:
“When are we to make the assault, sir?”
The stranger’s countenance lighted up.
“It will not be very long now, lad; the time is at hand. Well, I
have much to do; good-bye, ensign!”
The man held out his hand, adding, “Remain a true, God-fearing
gentleman, of whom your country may be proud, as it is not of that
man who has just left us.”
“Good-bye, sir!—— But would you tell me your name?”
34. “I am Brigadier Nicholson,” was the simple reply.
Ted’s heart glowed with pride and pleasure. He had shaken
hands with this famous man; he had actually enjoyed ten minutes’
private talk with him—a thing half the officers in the camp would
have given much for. The name of the young general was on
everyone’s lips. Over the heads of his seniors in rank John Nicholson
had been given the command of the Punjab Movable Column, and
wherever that column had marched victory had crowned its arms, no
matter what the odds. Along the frontier of the Indus, amidst the
wild robber clans of Bannu, he was worshipped as a deity; and Ted
now understood what had been incomprehensible before, namely,
the strange behaviour of the subadar, and the sudden awe that had
fallen upon the Pathans as soon as Ahmed Khan had whispered the
magic words “Jan Nikkulseyn”.
35. CHAPTER XXI
“Wombwell’s Menagerie”
On his return in the early morning of the following day, Ted
related his adventures to brother and cousin, and told of his
interview with the hero of the Punjab.
“Yes,” replied Jim, “Nicholson has been here inspecting our
defences and examining our men. He’s left his column behind and
galloped on to confer with our general. Lucky for you, young ’un,
that he happened to be present. But, then, you are such a lucky
beggar!”
“I wonder what they’ll do to your friend the major?” observed
Charlie, whose splendid constitution was doing wonders for him.
“Ask him to resign, I expect,” Jim opined.
But that officer of the 15th Derajats had already resigned. Before
he and his escort had left the Ridge a shell from one of the Mori 24-
pounders exploded in their midst, killing the major and one sepoy
and wounding four others. Ted, however, did not learn this until the
following day, and at the same time he heard that Nicholson had left
the camp and ridden out to bring in his column, which was now
close at hand.
“Before I forget, here’s something for you, Ted,” Jim exclaimed,
after the three had discussed the ensign’s adventures at some
length. “The mail came while you were away, and I had a letter from
Ethel enclosing this for you.”
36. Jim handed his brother a note, which Ted promptly opened and
read.
“It’s very jolly of her! The colonel has nearly completely
recovered, she says, and they are quite safe. Will you swop letters,
Jim?”
“Wouldn’t you like to? Cheeky young cub!”
Charlie laughed.
“I’ve already offered him half my daily pay for a sight of the
precious document, and he’s waiting for me to raise the bid. He’s
been looking so radiantly absurd, young ’un, since he received it,
that I’ve been longing to throw my boots at him, but unfortunately I
can’t get at them.”
Jim winked solemnly at his cousin, and appeared far too happy to
be abashed by the satire of his facetious relatives.
Before long news reached the Ridge that the Punjab Movable
Column was coming in. The whole camp turned out to meet Jan
Nikkulseyn’s ever-victorious men. Brigadier Nicholson was, of course,
under General Sir Archdale Wilson, yet the whole army looked upon
him as the man destined to lead them to victory. All felt that a great
soldier was in their midst—nor were they disappointed. Hardly had
he arrived before he led them out to attack the foe at Nujufgurh,
where a splendid success was won, and the enthusiasm of the
wearied troops was aroused.
On the 4th September the last reinforcements came in. The
remainder of the 60th Rifles arrived from Meerut to join their
brethren, the comrades of the little Gurkhas at the house of Hindu
Rao, as well as a contingent from the Dogra ruler of Jummu and
Kashmir. But the whole camp turned out to cheer a still more
welcome reinforcement which accompanied these.
Escorted by the Rifles came the guns—the big guns, the siege
guns, the real guns at last! With slow and stately tread, as though
37. conscious of their importance and of the impression they were
making, the massive elephants—two harnessed to each gun—
appeared in sight, hauling the ponderous cannon to the place that
needed them so much. With what delight the long-looked-for guns
were greeted may well be imagined. The fortunate soldiers of 1857
had never heard the classic phrases “Now we sha’n’t be long!” and
“Let ’em all come!”, but if they had, they would certainly have used
them.
In the thick of the crowd was Ted, who had got leave of absence
from the Ridge, and as Alec could not accompany him, he looked out
for any other chums who might be there, and soon caught sight of
the khaki and blazing scarlet of Claude Boldre, gay with the colours
of the “Flamingoes”. They greeted Lieutenant Roberts, who was busy
with his multifarious duties as D. A. Q. M. G., but cheerful and brisk
as ever, and stood behind a group of hilarious Tommies.
“Here come the guns at last!” cried a carabineer in an ecstacy of
enthusiasm.
“Git away wid ye, it’s Wombwell’s menagerie comin’ to give us an
entertainment!” declared an Irish private.
“Nice little ponies them are, drorin’ them!” was another
comment.
“What—the uttees? Three cheers for the bloomin’ uttees!”[1]
[1] “Uttee” is Mr. Thomas Atkins’ rendering of “hathi”, the
Hindustani for elephant, as readers of The Jungle Book will know.
“What’ll we do wiv the huttees when we’ve got the guns fixed
hup? They’ll heat their ’eads hoff ’ere. There won’t be none of hus
left for fightin’; we shall hall ’ave to go hout foragin’ for food for the
helephints hall day,” observed a soldier of Cockney extraction.
“Ay,” a friend replied, “and they’ll want exercising. Bill, you’ll ’ave
to go and take ’arf a dozen helephints for a run every mornin’ before
38. breakfast, same as you used to do them fox-terriers you used to
have.”
Bill was wont to boast of the ratting qualities of his dogs at
home.
“Ay, Bill,” chaffed another. “Go an’ take ’em rattin’ along the
banks of the Jumner; they’re beggars for rats are uttees.”
Bill was equal to the occasion, however, and readily replied:
“Nothin’ of the sort! General told me has the helephints was
comin’ to-day, an’ ’e says to me, ‘Bill,’ sez ’e, ‘wot are we to do with
them uttees when they come?’ ‘General,’ sez hi, ‘why not mount the
Gurkeys on ’em an’ make ’em into light horsemen?—there’s nobody
else’s legs ’ud go round a huttee.’ ‘Bill,’ sez ’e, ‘you’re a genius!’”
The laugh that followed showed that Bill had scored, and a group
of officers standing by, who had up to this point tried to preserve a
sedate demeanour, joined in the merriment at the thought of a little
Gurkha perched astride one of the monsters. Regardless of the jests
at their expense, the huge pachyderms came steadily on through the
clustered ranks of interested and gaping spectators.
“By gum, boys, them are guns! We’ll soon be in Delhi now!”
“Three cheers for the Bengal Artillery! and three more for John
Lawrence who sent them!”
The cheers were lustily given, for hopes ran high.
“They ought to make short work of the walls,” said Claude. “I
think we’re going to have a look in at last.”
“Yes; we’re all getting a bit sick of waiting. Hope we can get a
good place in the stalls when the theatre doors open,” Ted replied.
“And I hope Nicholson leads us. By the way, I suppose you’ve
heard nothing fresh from Aurungpore?”
39. “Nothing.”
“That’s rough on you. It must be horribly upsetting to have the
matter hanging over so long.”
“It is. I’m glad we’re kept so busy, though, as I haven’t much
time to think of it.”
“Never say die! Truth will out, you know, and you’ll be all right.
Alec Paterson told me the whole story. That chap Tynan must be a
pretty average cad. More guns coming!”
“’Ullo!” exclaimed our friend Bill as the end of the procession
came into sight, “where’s the rest of the show? There’s nothing but
huttees!”
“No more there isn’t. This is a bloomin’ fine circus, this is!”
“Here, you!” shouted a dragoon to a dignified mahout, “where’s
yer giraffes, an’ ’ippopotamusses, an’ ricoconoseroses, an’
kangeroos? Why, there ain’t no clowns nor hacrobats!—this is a
fraud! Gimme me money back, I can see a better menagerie than
this in Hengland!”
“Ay, give us our money back!” chimed in the others in tones of
simulated indignation; and roars of laughter went up, to the
astonishment of the staid Sikhs and Punjabis, and to the delight of
the jolly little Gurkhas.
But though the whole camp was in such high spirits, the more
knowing ones understood that Delhi had not fallen yet, and that
these cannon were no bigger, and were greatly inferior in number to
those mounted on the city walls. Also that the mutineers’ guns,
being sheltered by the solid masonry, were twice as effective as their
own unprotected armament.
During the next few days the whole camp helped the Engineers
to put into execution the plan of attack which Colonel Baird Smith’s
masterly brain had planned. At dead of night the soldiers
40. constructed batteries and shelter-trenches between the English
camp and the walls, in positions where it would have meant death to
have worked by daylight. Before long thousands of gabions[1] and
acres of fascines[2] had been made for the protection of gunners.
[1] Gabions are hollow cylinders of basket-work filled with
earth.
[2] Fascines are large bundles of brushwood faggots.
On the eventful morning of 8th September, 1857, Major Brind of
the Artillery—a man concerning whom an officer present observed:
“Talk about the V.C., why, Brind should be covered with them from
head to foot!”—is given the honour of commencing the
bombardment from No. 1 Battery, only seven hundred and fifty yards
from the walls. In spite of all Brind’s labours of the night, the sun
rises before his battery is ready for action, and the mutineers at
once perceive his designs. Pitiless showers of well-directed grape
plunge in and around the battery. Though but half-sheltered from
this terrible fire, Brind’s gunners, assisted by a detachment of the
Gurkhas of the Kumaon Battalion, go on with the rapid completion of
the work. At length a single howitzer is dragged into position, and
the first shot of the real bombardment is fired. It is but a feeble
retort to the thundering giants of the Mori and Kashmir bastions, and
the foemen laugh as they continue to pound the gallant little band
with round-shot, grape, and shell. Ted from his post on the Ridge
looks on with disappointed eyes.
But before long a second gun is on its platform, and then a third,
and the rebels laugh no longer. And soon the battery is complete;
five 18-pounders and four 24-pounders, magnificently aimed and
served, are replying in earnest, as though the very cannon knew
how long the army had been waiting for them, and had resolved to
do their duty and show that the waiting had not been in vain. With
high hopes and expectations thousands of British, Gurkha, Pathan,
Sikh, and Dogra soldiers look on at the awful duel. Idle spectators
are they, unable to assist, and safe from the venomous fire of the
41. rebel cannon which are now all directed to the destruction of this
impertinent No. 1 Battery. The insurgents stand manfully to their
guns, but the finest artillerymen in the world are serving under
Brind, and at length, to the delight and amid the resounding cheers
and hurrahs of the spectators, the massive masonry of the Mori
Bastion, that looked but yesterday strong enough to defy an
earthquake, begins to crumble away. The answering fire slackens
and dwindles down.
By this time No. 2 Battery (Campbell’s) is ready, but is directed to
wait until No. 3 can also be prepared, in order that the enemy’s
surprise may be the greater. With No. 2 is a party of the Jummu
contingent, who are at first unwilling to ply spades and shovels or
pile sand-bags, murmuring that they are come to fight, not to do
coolie work. As the mutineers blaze away, these Dogra Rajputs,
throwing down shovels, seize their muskets and fire harmlessly at
the stone walls, to the great danger of the artillerymen. They are at
once told by Major Campbell that they are there to work and not to
play at fighting, and they manfully settle down to the uncongenial
task.
The attention of the foe having been purposely attracted by No.
1 Battery, No. 3 (Scott’s)—partially prepared during the night, and
concealed by grass and branches of trees—has been secretly at
work, and is ready on the morning of the 12th. Dangerously near to
the rebel cannon is No. 3; less than two hundred yards separate the
British gunners from their antagonists. Almost at the same moment
No. 4 Battery (Major Tombs’) prepares for action. To achieve the
secret completion of these batteries has been the brilliant work of
Colonel Baird Smith and of his worthy second in command,
Engineer-Captain Alexander Taylor.
For three days Brind’s guns have been reducing the gigantic and
formidable Mori Bastion to powder, whilst the other three batteries
have been preparing to lend him a hand.
42. “Not much left of our old friend!” observes Major Reid cheerfully
to a small group of his officers, who stand gazing upon the work of
destruction on the evening of September the 11th.
As Reid speaks, another shell strikes their ancient antagonist, the
Mori Bastion, towards which he is pointing.
“They’re defending it well, though, sir,” replies Captain Russell, as
gun after gun is brought forward by the rebels, who are making
praiseworthy efforts to silence Brind. “We’ve got so used to the old
bastion that one feels almost sorry to see him going to the dogs in
this way.”
“He’s losing flesh rapidly,” Ted joins in, as yet another of Brind’s
kind regards is sent crashing against the once rock-like wall and a
fresh shower of dust is thrown up.
“I can’t say that I feel much pity for him,” Reid grimly declared.
“He has too many of my brave lads’ lives to answer for,” the
commandant added with a tinge of sadness in his voice.
“Well, the rest will be merely child’s play, I fancy,” conjectured a
young lieutenant standing by.
Major Reid solemnly regarded the author of this remark for a few
seconds before replying.
“You think so, young man?” he asked. “Better keep the playing
until it is over. The hard work is yet to come.”
Whilst the bombardment proceeds, the Ridge is tolerably safe,
for the Delhi guns are too much occupied with Brind’s pestilent
battery to pay much heed to any other place. The duel continues,
waxing hotter and still more hot.
“Splendid practice our fellows are making!” says Jim presently.
“They’re a long time with those other batteries,” our ensign
hazards. “I wish to goodness they’d hurry them up, and then for
43. storming the place!”
“Don’t be impatient, youngster,” Reid replies. “If we play our part
as well as the Artillery and Engineers are doing theirs, our country
will have precious little cause for complaint. They are doing their
work magnificently; they’ve already accomplished wonders, and it’s
a lot more easy to talk about it and to criticise them, than to get
guns into position in the face of those bastions.”
Feeling somewhat abashed by his chief’s rebuke, as he doubtless
deserved to be, Ted discreetly remains silent.
Darkness closing in brings the artillery duel to an end, and the
troops lie down for the night.
Not all, however.
Under cover of the night the sappers and miners and gunners are
hard at work completing the preparations for batteries Nos. 3 and 4.
Our fellows work like true Britons, for their hearts are in their labour.
Encouraged by Captain Taylor, who superintends the work, and by
their other officers, all of whom lend a hand like the meanest
private, they toil on with steadfast, energetic purpose, and daylight
finds them prepared.
Word has mysteriously reached the Ridge that to-morrow’s sun
will see a bombardment the like of which has never before been
known in the East, and our friends are stirring soon after sunrise,
waiting in exultant anticipation.
“Is it true, sir,” asks Ted, “that all four batteries will be playing on
the town this morning?”
“I’m hoping so, but I can’t say how far they got last night.”
At length the longed-for moment arrives. At eight o’clock on the
morning of the 12th nine 24-pounders of No. 2 Battery open fire
simultaneously on the Kashmir Bastion. Ringing cheers of triumph
greet this, the greatest salvo of the whole war, for, as the smoke
44. clears away and the deafening thunder and reverberating echoes die
down, our friends and their fellow-spectators see that this very first
discharge is bringing down huge masses of masonry.
A moment of profound silence follows: then a mighty cry of
exultation bursts forth.
“Ah! Well done! Well aimed, Campbell!” scream the enthusiastic
onlookers.
But the insurgent guns hotly and strenuously reply, and
Campbell’s battery seem likely to suffer severely, for the rebel fire is
not only hot, but is also exceedingly well directed.
“They’re keeping their tails up pluckily enough. Villains though
they are, they’re not cowards,” murmurs one.
“That’s true! Seems to me that No. 2’s in a tight place enough. I
only hope—”
What that officer hoped will never be known.
A deafening roar from another direction interrupts his expression
of opinion and announces that Major Tombs’ Battery (No. 4) is
dealing with the rebel guns.
“Hurrah! Tombs is givin’ it ’em ’ot! Tombs ’e’s a-silencin’ of ’em!”
shout the riflemen.
“Ulu-ulu-ulu!” scream the delighted Gurkhas.
“Ah!” gasp the astounded Sikhs and Pathans, who have never
before seen cannonade like this.
Whilst the British riflemen estimate and argue the distance of the
battery from the walls and the probable duration of the
bombardment, the Guides and Gurkhas chatter and scream with
excitement. Many of these allies of ours have been somewhat prone
to consider themselves quite as good soldiers as their employers, but
now they are beginning to understand a little more clearly the extent
45. of the British power and resources. And such consideration is good
for them.
Again Tombs’s gunners fling their iron hail against the Delhi
cannon, putting them out of action one by one.
“Why, Tombs has got within two hundred yards!” a spectator
guesses.
“No, hardly so close as that,” declares a second.
“Well, he ain’t much farther away,” another joins in. And
exclamations of “Well done, Tombs!” “Well aimed, sir!” ring out from
the Ridge unheeded, because unheard by the gunners steadily
plying their grim trade. For Major Tombs is a general favourite;
stories of his prowess and dare-devilry have spread throughout the
British camp, and the approving cheers are echoed from scores of
throats.
“Might this be a cricket match?” suavely enquires a captain of the
60th Rifles as he smiles at the enthusiasm.
The mutineers are aghast! How have those batteries been
brought there and concealed and protected? And then, only one
hundred and sixty yards from the Water Bastion, No. 3 unmasks.
But, alas! the work has necessarily been done at night, and in the
darkness a serious mistake has been made. The big piles of covered
sand-bags, which had been placed to hide the guns from the
watchful enemy, as well as to protect our gunners from their fire
when the moment should come for unmasking, are found to have
been carefully piled in a wrong position, so as to obstruct the aim of
our guns. For men to go outside the shelter in order to remove the
obstruction will not only take a long time, but will expose to almost
certain death any brave enough to venture out. So thinks the heroic
commandant of the battery, who fears nothing for himself, but
hesitates to order his men to be shot down one by one, for so close
are they under the walls that the rebel gunners can hardly miss
them. But while he pauses in doubt, a Sikh sapper calmly springs
46. Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.
More than just a book-buying platform, we strive to be a bridge
connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.
Join us on a journey of knowledge exploration, passion nurturing, and
personal growth every day!
testbankfan.com