Programming in C 2 e Second Edition Dey Download
Programming in C 2 e Second Edition Dey Download
Download (2025)
https://ebookultra.com/download/programming-in-c-2-e-second-
edition-dey/
https://ebookultra.com/download/object-oriented-programming-in-c-4th-
edition-e-balagurusamy/
https://ebookultra.com/download/programming-in-c-a-primer-3rd-edition-
e-balagurusamy/
https://ebookultra.com/download/c-programming-for-the-absolute-
beginner-second-edition-mark-lee/
https://ebookultra.com/download/programming-concepts-in-c-2nd-edition-
robert-burns/
Functional Programming in C First Edition Ivan Cukic
https://ebookultra.com/download/functional-programming-in-c-first-
edition-ivan-cukic/
https://ebookultra.com/download/memory-as-a-programming-concept-in-c-
and-c-frantisek-franek/
https://ebookultra.com/download/the-world-of-northern-evergreens-
second-edition-e-c-pielou/
https://ebookultra.com/download/c-network-programming-
vol-2-systematic-reuse-with-ace-and-frameworks-6-print-edition-
schmidt/
https://ebookultra.com/download/advancements-in-applied-metaheuristic-
computing-1st-edition-nilanjan-dey/
Programming in C 2 e Second Edition Dey Digital Instant
Download
Author(s): Dey, Pradip; Ghosh, Manas
ISBN(s): 9781680152852, 1680152858
Edition: Second edition
File Details: PDF, 12.54 MB
Year: 2011
Language: english
Programming in
C
Second Edition
OXFORD
UNIVERSITY PRESS
© Oxford University Press 2011
ISBN: 978-0-198065-28-9
C Preface to the
First Edition
ters are declared and handled is explained with ample ex- The appendices contain case studies where the problem
amples in Chapter 5. is first defined and then the algorithm is developed, based
The concept of functions, its form, and its requirement on which the C program is coded. Some sample runs ob-
in a program is discussed in Chapter 6 with well-explained tained during the execution of these programs have also
examples. Recursive functions are also described with been included. It also contains tables for ASCII codes, num-
several examples. Analysis of time and space complexity ber system conversions, escape sequences, operators, data
for an algorithm has also been presented in this chapter. types and data conversion rules, commonly used conver-
One of the most important features of C is pointers. sion characters, and format tags. Among many other useful
Starting with an introduction to pointers, Chapter 7 also topics covered in the appendices, an exhaustive listing of
elaborates on how pointers are used with arrays, strings, C library functions, with programs illustrating how these
and functions. The use of pointers is also described in functions can be put to use, have also been presented.
depth with innumerable examples.
User-defined data types such as structures and unions ACKNOWLEDGEMENTS
are described in Chapter 8. What these data types com-
prise and how these are handled and used are illustrated We thank our students Rakesh Dutta and Niloy Debnath
with examples. for verifying the programs in this book and Sonia Khed-
Creating, amending, appending, and many other opera- wal, Priyanka Nawalkar, Sayantani Saha, and Debolina
tions on files in C is a necessity for storing and retrieving Sharangi for their assistance in the preparation of the
data and programs. This has been covered in Chapter 9 model questions. We are grateful to the staff of Oxford
with sufficient examples. University Press for their continuous cooperation, interest,
Linked list, which is a popular data structure, has been and assistance extended to us during the preparation of the
covered in Chapter 10. Various types of linked lists and the book. We are also thankful to our colleague Mr Manash
different operations that can be carried out on such linked Sinharoy for helping us in preparing the manuscript in
lists have been discussed. In this chapter, readers will also time and Mr Tapas Kumar Tunga and Mr P.N. Pathak for
get to know how pointers are used in constructing this data their assistance in the preparation of the manuscript.
structure. Special thanks are due to Mr Steve Summit for his ar-
Chapter 11 highlights some of the advanced features ticles on C, which have guided us in preparing some of the
of C such as command-line arguments, bit-wise operators, topics in this book. We also wish to thank Mr Vijay Kumar
different memory models, and type qualifiers with several R Zanvar and Mr Jayasima Ananth for the article on point-
illustrations. ers and arrays as also Mr Thomas Jenkins for the article on
Frequently asked questions are always a source of recursion, both of which have served as a guide during the
learning. Some frequently asked questions have been in- development of this manuscript. We express our gratitude
cluded at end of the book, which will help readers to clear to Mr Peter Burden, Mr Mike Banahan, Mr Declan Brady,
any doubts pertaining to programming in C. and Mr Mark Doran for their articles on C.
PRADIP DEY
MANAS GHOSH
C Preface to the
Second Edition
Accessing and Initializing the Members of a 10.5 Introduction to Circular Doubly Linked List 450
Union 371 10.6 Applications of Linked Lists 451
Structure Versus Union 372 Dynamic Storage Management 451
8.4 Enumeration Types 373 Garbage Collection and Compaction 452
8.5 Bitfields 374 10.7 Disadvantages of Linked Lists 454
10.8 Array Versus Linked List Revisited 454
9 FILES IN C 388
9.1 Introduction 388 11 ADVANCED C 460
9.2 Using Files in C 390 11.1 Introduction 460
Declaration of File Pointer 390 11.2 Bitwise Operator 461
Opening a File 391 Bitwise and 462
Closing and Flushing Files 392 Bitwise or 463
9.3 Working with Text Files 393 Bitwise Exclusive-OR 464
Character Input and Output 393 Bitwise Not 464
End of File (EOF) 394 Bitwise Shift Operator 465
Detecting the End of a File Using the feof() 11.3 Command-Line Arguments 467
Function 400 11.4 The C Preprocessor 470
9.4 Working with Binary Files 401 The C Preprocessor Directives 470
9.5 Direct File Input and Output 402 Predefined Identifiers 474
Sequential Versus Random File Access 403 11.5 Type Qualifier 475
9.6 Files of Records 403 Const Qualifier 476
Working with Files of Records 403 Volatile Qualifier 478
9.7 Random Access to Files of Records 410 Restrict Qualifier 479
9.8 Other File Management Functions 413 11.6 Variable Length Argument List 480
Deleting a File 413 11.7 Memory Models and Pointers 481
Renaming a File 413
9.9 Low-Level I/O 414
12 STACKS, QUEUES, AND TREES 492
12.1 Introduction 492
10 LINKED LISTS 423 12.2 Stack 493
10.1 Introduction 423 Implementation of Stack 493
10.2 Singly Linked List 425 Application of Stack 498
Insertion of a Node in a Singly Linked List 430 12.3 Queue 499
Deletion of a Node from a Singly Linked List 434 Implementation of Queue 499
Sorting a Singly Linked List 435 Other Variations of Queue 505
Destroying a Singly Linked List 436 Applications of Queue 505
More Complex Operations on Singly Linked 12.4 Tree 506
Lists 437 Some Basic Tree Terminology 507
10.3 Circular Linked Lists 440 Binary Tree 507
Appending a Node 441 Traversals of a Binary Tree 509
Displaying a Circular Linked List 442 Kinds of Binary Trees 511
Inserting a Node After a Specified Node 442 Binary Search Tree 511
Inserting a Node Before a Particular Node 443 Application of Tree 518
Deleting a Node 444
Sorting a Circular Linked List 446 Appendices 524
10.4 Doubly Linked List 446 Bibliography and References 544
Operations on Doubly Linked List 447 Index 545
Advantages/Disadvantages of DoublyLinked
Lists 450
C Introduction to
Programming, Algorithms
and Flowcharts
Chapter 1
Learning Objectives
After reading this chapter, the readers will be able to
define program and programming
identify system programs and application programs
get a basic concept of high-, middle-, and low-level languages
briefly understand compiler, interpreter, linker, and loader functions
understand algorithms and the key features of an algorithm—sequence, decision, and
repetition
learn the different ways of stating algorithms—step-form, flowchart, etc.
define variables, types of variables, and naming conventions for variables
decide a strategy for designing algorithms
1.1 PROGRAMS AND PROGRAMMING The process of writing a program is called programming.
It is a necessary and critical step in data processing.
A computer can neither think nor make a decision on An incorrect program delivers results that cannot be
its own. In fact, it is not possible for any computer to used. There are two ways by which one can acquire a
independently analyze a given data and find a solution on program—either purchase an existing program, referred
its own. It needs a program which will convey what is to to as packaged software or prepare a new program from
be done. A program is a set of logically related instructions scratch, in which case it is called customized software.
that is arranged in a sequence that directs the computer in Computer software can be broadly classified into two
solving a problem. categories: system software and application software.
2 Programming in C
has to be performed by the instruction. All computers have computer, the programmer may be required to learn
operation codes for functions such as adding, subtracting a new machine code and would have to write all the
and moving. The second part of the instruction either existing programs again in case the computer system
specifies that the operand contains data on which the is changed.
operation has to be performed or it specifies that the ∑ Error prone It is hard to understand and remember
operand contains a location, the contents of which have to the various combinations of 1’s and 0’s representing
be subjected to the operation. data and instructions. This makes it difficult for a
programmer to concentrate fully on the logic of the
problem, thus frequently causing errors.
n-bits ∑ Difficult to debug and modify Checking machine
p-bits q-bits r-bits
instructions to locate errors are about as tedious as
writing the instructions. Further, modifying such a
Operation Code Mode Operand program is highly problematic.
Following is an example of a machine language
Figure 1.5 General format of machine language
program for adding two numbers.
instruction
Example
Just as hardware is classified into generations based on 1. Machine Code Comments
technology, computer languages also have a generation
classification based on the level of interaction with the 0011 1100 Load A register with value 7
machine. Machine language is considered to be the first 0000 0111
generation language (1GL). 0000 0110 Load B register with 10
Advantage of machine language The CPU directly 0000 1010
understands machine instructions, and hence no translation 1000 0000 A=A+B
is required. Therefore, the computer directly starts executing
0011 1010 Store the result into the memory location
the machine language instructions, and it takes less execution whose address is 100 (decimal)
time.
0110 0110
0111 0110 Halt processing
Disadvantages of machine language
∑ Difficult to use It is difficult to understand and de-
Assembly language
velop a program using machine language. For any-
body checking such a program, it would be difficult When symbols such as letters, digits, or special characters
to forecast the output when it is executed. Neverthe- are employed for the operation, operand, and other parts
less, computer hardware recognizes only this type of of the instruction code, the representation is called an
instruction code. assembly language instruction. Such representations are
∑ Machine dependent The programmer has to re- known as mnemonic codes; they are used instead of binary
member machine characteristics while preparing a codes. A program written with mnemonic codes forms an
program. As the internal design of the computer is assembly language program. This is considered to be a
different across types, which in turn is determined by second generation language (2GL).
the actual design or construction of the ALU, CU, and Machine and assembly languages are referred to as
size of the word length of the memory unit, the ma- low-level languages since the coding for a problem is at
chine language also varies from one type of computer the individual instruction level. Each computer has its own
to another. Hence, it is important to note that after be- assembly language that is dependent upon the internal
coming proficient in the machine code of a particular architecture of the processor.
Introduction to Programming, Algorithms and Flowcharts 5
An assembler is a translator that takes input in the form in machine language. Instead of binary sequence, as in
of the assembly language program and produces machine machine language, a program in assembly language is
language code as its output. An instruction word consists written in the form of symbolic instructions. This gives
of parts shown in Fig. 1.5 where, the assembly language program improved readability.
∑ the Opcode (Operation Code) part indicates the Disadvantages of assembly language
operation to be performed by the instruction and
∑ Assembly language is specific to a particular machine
∑ the mode and operand parts convey the address of the architecture, i.e., machine dependent. Assembly
data to be found or stored. languages are designed for a specific make and model
The following is an example of an assembly language of a microprocessor. This means that assembly language
program for adding two numbers X and Y and storing the
programs written for one processor will not work on a
result in some memory location.
different processor if it is architecturally different. That
is why an assembly language program is not portable.
Example
∑ Programming is difficult and time consuming.
2. Mnemonics Comments Register/ Location
∑ The programmer should know all about the logical
LD A, 7 Load register A with 7 A 7 structure of the computer.
LD B, 10 Load register B with 10 B 10
ADD A, B A + B: Add contents of A 17 1.2.4 High-level Languages
A with contents of B and
High-level programming languages such as COBOL,
store result in register A
FORTRAN, and BASIC were mentioned earlier in the
LD (100), A Save the result in the main
chapter. Such languages have instructions that are similar
memory location 100 100 17
to human languages and have a set grammar that makes it
HALT Halt process
easy for a programmer to write programs and identify and
correct errors in them. To illustrate this point, a program
From this example program, it is clear that using written in BASIC, to obtain the sum of two numbers, is
mnemonics such as LD, ADD, and HALT, the readability shown below.
of the program has improved significantly.
An assembly language program cannot be executed by Example
a machine directly as it is not in a binary machine language 3. Stmt. No. Program stmnt Comments
form. An assembler is needed to translate an assembly 10 LET X = 7 Put 7 into X
language program into the object code, which can then be 20 LET Y = 10 Put 10 into Y
executed by the machine. The object code is the machine 30 LET SUM = X + Y Add values in X and Y and
put in SUM.
language code. This is illustrated in Fig. 1.6.
40 PRINT SUM Output the content in SUM.
50 END Stop
Assembly Object Code The time and cost of creating machine and assembly
Language Assembler in Machine
Program Language language programs were quite high. This motivated the
Source Code Object Code
development of high-level languages.
Portability High-level programming languages can be The compiler and interpreter have different approaches
run on different machines with little or no change. It to translation. Table 1.1 lists the differences between a
is, therefore, possible to exchange software, leading to compiler and an interpreter.
creation of program libraries.
Table 1.1 Differences between a compiler and an Interpreter
Easy debugging Errors can be easily detected and removed.
Compiler Interpreter
Ease in the development of software Since the commands
Scans the entire program Translates and executes the
of these programming languages are closer to the English before translating it into program line by line.
language, software can be developed with ease. machine code.
High-level languages are also called third generation Converts the entire The interpreter executes one
languages (3GLs). program to machine code line at a time, after checking
and executes program only and correcting its syntax
Points to Note when all the syntax errors errors and then converting it to
1. There are two kinds of programming languages --- the are removed. machine code.
low-level and high level. Slow in debugging or Good for fast debugging.
2. The high level programming language is easy to read, removal of mistakes from a
portable, allows swift development of programs and is program.
easy to debug. Program execution time is Program execution time is
3. The low level programming language is not portable, less. more.
takes more time to develop programs and debugging
is difficult.
1.3.1 Compiling and Executing High-level Language
Programs
1.3 COMPILER, INTERPRETER, LOADER, AND
The compiling process consists of two steps: the analysis of
LINKER
the source program and the synthesis of the object program
For executing a program written in a high-level language, in the machine language of the specified machine.
it must be first translated into a form the machine can The analysis phase uses the precise description of
understand. This is done by a software called the compiler. the source programming language. A source language is
The compiler takes the high-level language program as described using lexical rules, syntax rules, and semantic
input and produces the machine language code as output rules.
for the machine to execute the program . This is illustrated Lexical rules specify the valid syntactic elements or
in Fig. 1.7. words of the language. Syntax rules specify the way in
which valid syntactic elements are combined to form
the statements of the language. Syntax rules are often
described using a notation known as BNF (Backus Naur
Source Object Code Form) grammar. Semantic rules assign meanings to valid
Program in Compiler in Machine
High Level Language
statements of the language.
The steps in the process of translating a source program
Figure 1.7 Compiler action in a high-level language to executable code are depicted in
Fig. 1.8.
The first block is the lexical analyzer. It takes successive
During the process of translation, the compiler reads lines of a program and breaks them into individual
the source program statement- wise and checks for syntax lexical items namely, identifier, operator delimiter, etc.
errors. In case of any error, the computer generates a and attaches a type tag to each of these. Beside this, it
printout of the same. This action is known as diagnostics. constructs a symbol table for each identifier and finds the
There is another type of software that also does internal representation of each constant. The symbol table
translation. This is called an interpreter. is used later to allocate memory to each variable.
Introduction to Programming, Algorithms and Flowcharts 7
Therefore, the execution of a program written in high-
level language involves the following steps:
Lexical Syntax Semantic
Rules Rules Rules 1. Translation of the program resulting in the object
program.
2. Linking of the translated program with other object
Source Lexical Syntactic Semantic programs needed for execution, thereby resulting in a
Program Analysis Analysis Analysis
binary program.
3. Relocation of the program to execute from the specific
Intermediate memory area allocated to it.
Symbol Other
Table Tables
Code 4. Loading of the program in the memory for the purpose
of execution.
Code
Generator
Object Code
from Other
1.3.2 Linker
Compilations
Linker and Object Code Linking resolves symbolic references between object
Loader programs. It makes object programs known to each other.
The features of a programming language influence the
Executable linking requirements of a program. In FORTRAN/COBOL,
Code all program units are translated separately. Hence, all
subprogram calls and common variable references require
Figure 1.8 The process of compilation linking. PASCAL procedures are typically nested inside
the main program. Hence, procedure references do not
require linking; they can be handled through relocation.
References to built-in functions however require linking.
The second stage of translation is called syntax analysis In C, files are translated separately. Thus, only function
or parsing. In this phase, expressions, declarations, and calls that cross file boundaries and references to global
other statements are identified by using the results of lexical data require linking. Linking makes the addresses of
analysis. Syntax analysis is done by using techniques programs known to each other so that transfer of control
based on formal grammar of the programming language. from one subprogram to another or a main program takes
In the semantic analysis phase, the syntactic units place during execution.
recognized by the syntax analyzer are processed. An
intermediate representation of the final machine language
Relocation
code is produced.
The last phase of translation is code generation, when Relocation means adjustment of all address-dependent
optimization to reduce the length of machine language locations, such as address constant, to correspond to the
program is carried out. The output of the code generator allocated space, which means simple modification of the
is a machine level language program for the specified object program so that it can be loaded at an address
computer. If a subprogram library is used or if some different from the location originally specified. Relocation
subroutines are separately translated and compiled, a final is more than simply moving a program from one area to
linking and loading step is needed to produce the complete another in the main memory. It refers to the adjustment
machine language program in an executable form. of address fields. The task of relocation is to add some
If subroutines were compiled separately, then the address constant value to each relative address in the memory
allocation of the resulting machine language instructions segment.
would not be final. When all routines are connected and
placed together in the main memory, suitable memory
1.3.3 Loader
addresses are allocated. The linker’s job is to find the
correct main memory locations of the final executable Loading means physically placing the machine instructions
program. The loader then places the executable program and data into main memory, also known as primary storage
in memory at its correct address. area.
8 Programming in C
A loader is a system program that accepts object programs operations may use system-supplied routines to do so.
and prepares them for execution and initiates the execution Input/output, in particular, is normally handled by routines
(see Fig. 1.9). The functions performed by the loader are : outside the user program. Hence, the machine language
∑ Assignment of load-time storage area to the program program produced by the translator must normally be
combined with other machine language programs residing
∑ Loading of program into assigned area
within the library to form a useful execution unit. This
∑ Relocation of program to execute properly from its process of program combination is called linking and the
load time storage area software that performs this operation is variously known
∑ Linking of programs with one another as a linking loader or a linkage editor. Linking is done
after object code generation, prior to program execution
time.
At load time, a linking loader combines whatever
Source
Program Data programs are required and loads them directly into primary
storage. A linkage editor also performs the same task,
but it creates a load image that it preserves on secondary
Binary
Translator Linker Loader Program storage for future reference. Whenever a program is to be
executed, the load image produced by the linkage editor
may be loaded immediately without the overhead of
Result
recombining program segments.
Object Binary
Module Program
Points to Note
Data Flow
Control Flow 1. A compiler converts a high-level language program
into executable machine instructions after the removal
Figure 1.9 A schematic of program execution of syntax errors.
2. An interpreter executes each high-level language pro-
gram one line at a time after removing its syntax error
Thus, a loader is a program that places a program’s and converting it into machine instructions.
instructions and data into primary storage locations. An 3. A linker makes the addresses of programs known to
absolute loader places these items into the precise locations each other so that transfer of control from one subpro-
indicated in the machine language program. A relocating gram to another or a main program takes place prop-
loader may load a program at various places in primary erly during execution.
storage depending on the availability of primary storage 4. A loader is a program that places a program’s execut-
area at the time of loading. A program may be relocated able machine instructions and data into primary stor-
age locations.
dynamically with the help of a relocating register. The
base address of the program in primary storage is placed
in the relocating register. The contents of the relocation 1.4 PROGRAM EXECUTION
register are added to each address developed by a running The primary memory of a computer, also called the
program. The user is able to execute the program as if it Random Access Memory, is divided into units known as
begins at location zero. At execution time, as the program words.
runs, all address references involve the relocation register. Depending on the computer, a word of memory may
This allows the program to reside in memory locations
be two, four, or even eight bytes in size. Each word is
other than those for which it was translated to occupy.
associated with a unique address, which is a positive
integer that helps the CPU to access the word. Addresses
1.3.4 Linking Loader and Linkage Editor increase consecutively from the top of the memory to its
User programs often contain only a small portion bottom. When a program is compiled and linked, each
of the instructions and data needed to solve a given instruction and each item of data is assigned an address. At
problem. Large subroutine libraries are provided so execution time, the CPU finds instructions and data from
that a programmer wanting to perform certain common these addresses.
Introduction to Programming, Algorithms and Flowcharts 9
The PC, or program counter, is a CPU register that to give the details of the procedure in the program, but
holds the address of the next instruction to be executed specify, instead, what is wanted. For example, assume
in a program. In the beginning, the PC holds the address that a programmer needs to display some data on the
of the zeroth instruction of the program. The CPU fetches screen, such as the address of a particular employee, say
and then executes the instruction found at this address. MANAS, from the EMP file. In a procedural language, the
The PC is meanwhile incremented to the address of the programmer would have to write a series of instructions
next instruction in the program. Having executed one using the following steps:
instruction, the CPU goes back to look up the PC where Step 1: Get a record from the EMP file.
it finds the address of the next instruction in the program. Step 2: If this is the record for MANAS, display the
This instruction may not necessarily be in the next address.
memory location. It could be at quite a different address.
Step 3: If this is not the record for MANAS, go to
For example, the last statement could have been a go to
step 1, until end-of-file.
statement, which unconditionally transfers control to a
In a non-procedural language (4GL), however, the
different point in the program; or there may have been a
programmer would write a single instruction that says:
branch to a function subprogram. The CPU fetches the
contents of the words addressed by the PC in the same Get the address of MANAS from EMP file.
amount of time, whatever their physical locations. The
Major fourth generation languages are used to get
CPU has random access capability to any and all words
information from files and databases, as in the previous
of the memory, no matter what their addresses. Program
example, and to display or print the information. These
execution proceeds in this way until the CPU has processed
fourth generation languages contain a query language,
the last instruction.
which is used to answer queries or questions with data
Points to Note from a database. The following example shows a query in
a common query language, SQL.
1. When a program is compiled and linked, each instruction
and each item of data is assigned an address. SELECT ADDRESS FROM EMP WHERE NAME =
2. During program execution, the CPU finds instructions ‘MANAS’
and data from the assigned addresses.
End user-oriented 4GLs are designed for applications
that process low data volumes. These 4GLs run on
1.5 FOURTH GENERATION LANGUAGES mainframe computers and may be employed either by
The Fourth Generation Language is a non-procedural information users or by the programmers. This type of 4GL
language that allows the user to simply specify what the may have its own internal database management software
output should be without describing how data should that in turn interacts with the organization’s DBMS
be processed to produce the result. Fourth generation package. People who are not professional programmers
programming languages are not as clearly defined as are use these products to query databases, develop their
the other earlier generation languages. Most people feel own custom-made applications, and generate their own
that a fourth generation language, commonly referred to reports with minimum amount of training. For example,
as 4GL, is a high-level language that requires significantly ORACLE offers a number of tools suitable for the end
fewer instructions to accomplish a particular task than user.
does a third generation language. Thus, a programmer Some fourth generation languages are used to produce
should be able to write a program faster in 4GL than in a complex printed reports. These languages contain certain
third generation language. types of programs called generators. With a report generator,
Most third generation languages are procedural the programmer specifies the headings, detailed data,
languages. That is, the programmer must specify the steps and totals needed in a report. Thus, the report generator
of the procedure the computer has to follow in a program. produces the required report using data from a file. Other
By contrast, most fourth generation languages are non- fourth generation languages are used to design screens
procedural languages. The programmer does not have for data input and output and for menus. These languages
Other documents randomly have
different content
Another topic endlessly debated was the railroad. It had just come
within range of practical vision. What were its possibilities? Would it
supplement or supersede canals? Enoch could not imagine that the
railroad would ever take the place of canals. Aaron thought it would.
Mitchell thought with Aaron, and Enoch for that reason was more
rigid in his opinion.
Once Aaron broke all precedent in this private chamber of commerce
by saying suddenly to Esther:
“What do you think?”
He had been observing her for some time. Through all their
interminable repetitious dinner table talk she maintained an air of
rapt attention, with her gaze on the one who was speaking, and
never uttered a word. He wondered if she were listening or merely
watching them. Both her father and Enoch were surprised that
anyone should address her with that kind of question. She was not
startled.
“I wonder which will make the world happier,” she said.
In the way she said it there was a kind of disbelieving that referred
neither to canals nor railroads but to something represented by the
discussion. The effect was strange. All three men were disturbed in
their sense of importance. They attacked her in concert, with a
condescending manner, Enoch leading. How like a woman to think
that way! What had happiness got to do with it? The question was
economic. Which would be the more efficient means of
transportation? But anyhow—this was Enoch—anyhow, was it not
obvious that whatever increased the wealth of the world increased
also the sum of human happiness?
“Is it?” said Esther.
They could get nothing more out of her. She declined to be argued
with and smiled at them from a great distance. Her smile was
impassable.
Several times after that Aaron tried to involve her in their
conversations, at dinner, or in the drawing room where she sat apart
with her needlework, but never again with any success. She would
look at him with a bothered expression, and either recognize his
effort by no other sign or slowly shake her head. This he took for
disapproval and thereafter ignored her, as the others did, except
now and then to scrutinize her in a surreptitious manner. When she
surprised him at that she returned his gaze with distant, impersonal
curiosity, until he was the first to turn away.
A change took place gradually in the partners’ relations with the
Mitchell menage. Aaron’s visits were no less recurring, but Enoch’s
became more frequent and regular. It was the only household in
New Damascus in which he felt wholly at ease with himself and
properly esteemed. He seldom went anywhere else. Very soon the
women people were saying they knew what the attraction was. A
certain expectation began to crystallize. Enoch became aware of it,
not knowing how. Mitchell cultivated it adroitly. Since his offer to
invest capital in the business of Gib and Breakspeare had been
declined the idea of marrying Esther to one of the firm took
possession of his thoughts. His preference was for Enoch because
more securely through him than through Aaron would the Mitchell
chariot be hitched to the star of iron. He talked of both of them to
Esther, with an air of being impartial, as if giving her his intimate,
unguarded impressions. As he understood women, their minds
worked on these matters in a contrary manner. To disparage Aaron
might be prejudicial to his ends. He never did that. Nevertheless,
Enoch came off by every comparison as much the superior person.
Esther listened attentively and said nothing.
“Do you ever think of getting married?” he asked her. “I sometimes
wonder.”
“No,” she said. “I never have. Why do you ask it?”
“But you may,” he said.
“Have you some one in view for me?” In her voice was a certain
elusive tone, unresolved between doubt and irony, that he knew and
hated. It made him uneasy. Sometimes it made him feel small.
“Seriously, I have,” he replied. “That is to say, I have hoped you
might become interested that way in Enoch Gib. You know what I
think of him. He will be a great man in this country if nothing
happens.”
“Does it much concern your happiness?” she asked. There was that
tone again.
“I wouldn’t put it that way,” he said. “I am thinking of your future. It
would give me a sense of great comfort.”
This was at dinner’s end one evening when they were alone. As he
talked, with his eyes down, he traced a figure on the table cloth with
a spoon, making it deeper and deeper as his unease increased. He
felt all the time that she was regarding him with a wide,
impenetrable expression.
“Oh,” she said, after an interval of silence.
He started and looked at her furtively. She was regarding him freely.
There was in her expression the trace of an ambiguous, amused
smile. He blushed and rose from the table.
Expectations increased. More marriages take place under the
tyranny of expectation than Heaven imagines. New Damascus
society became tensely expectant.
Enoch proposed, as Esther expected, with an air of bestowing
himself where he was sure to be appreciated. She took some time
about it and then accepted him.
Aaron was apparently the only person in New Damascus who had
not foreseen it. He was deeply astonished. Why? It was not an
improbable consummation. Yet it seemed to him strange and
unnatural.
He first heard of it at dinner with the Mitchells. Enoch was present.
Mitchell announced it as if Aaron were a large party of friends. He
responded as such. There was a false note in his felicitations. He
was aware of it; so was Esther. But in trying to cancel the impression
he made it worse. Enoch was protected as by wool with a sense of
proprietorship and self-satisfaction. Mitchell was insensitive.
Esther kept looking at Aaron. There was a troubled, startled
expression in her eyes. He misread it for distaste. He had long
imagined she disliked him. Several times that evening she was brief
with him, almost curt, and this had never happened before.
His visits to the Mitchell house thereafter were formal and less
frequent. Enoch’s manner of making himself paramount affected him
disagreeably. And Esther’s behaviour perplexed him. She was at one
time much more friendly than he expected and at another so
deliberately indifferent that he could only conclude that she meant to
estrange him.
Yet now a fatality began to operate. By a law of coincidence that we
do not understand, and may not exist, they began to meet outside
the household, purely, as it seemed in each case, by accident,—in
unexpected places, on the street again and again, once at night in a
crowd at an open air Punch and Judy show in which neither of them
was at all interested, once in Philadelphia where he was transacting
business and she was shopping with her maid, and once in a
memorable way on a path through the woods to Throne Rock, a
natural seat on the mountain summit from which the view of the
valley was exciting.
It was a Sunday afternoon in early May. He was going; she was
returning. They were at first surprised, then embarrassed, and
became absurdly self-conscious. She wore a wide-brim hat, pulled
down on both sides and tied under her chin. She was hot and tired;
her color was high. Her dress was torn. He noticed it.
“I was after these,” she said, catching his glance. She held out a
bunch of dogwood blossoms, with a gesture to share them. He
admired them and there was nothing else to say. So they stood, she
looking at him and holding out the dogwood flowers, he looking
fixedly at them, until her arm dropped and she turned to go on. He
let her go and went his way up the path. But he looked back. She
had stopped and was seated on a fallen tree trunk. He returned. She
did not look up.
“I’d like to give you a farewell party,” he said. “Will you come?”
“A farewell party?”
“There ought to be a better name for it,” he said. “A sour grape
party, then. I’ve always wanted to give you a dinner at the mansion.
Will you come?”
“Yes,” she said.
And again there was nothing else to say. She rose and he walked
with her toward the town.
“If Enoch won’t mind,” he said.
“Why should he mind?” she asked.
“Perhaps he won’t,” said Aaron.
This thought, as to whether Enoch should mind, had far and
separate projections in each of their minds and kept them silent until
at the natural parting of their ways she turned to face him and held
out her hand. It was a gesture of dismissal. He bowed and left her.
The dinner party took place just two weeks before her wedding day.
It was perhaps too elaborate. It contained every preparable element
of success. Aaron did his best to save it, and yet nobody enjoyed it.
Esther was visibly depressed. Enoch sulked. The guests rallied them
until it was seen to be hopeless and then let them alone. They
simply could not react with gaiety.
Aaron as host had special rights in the guest of honor and took
them. Enoch grew steadily worse. Opinion upon him was divided.
Some thought it was the natural gloom of his nature and were full of
foreboding for Esther. Others said they did believe the man was
jealous.
After a dance Esther and Aaron walked on the terrace.
“Forgive me,” she said. “I have spoiled the party.”
“No,” he said. “It’s my fault. I knew better. Yet I couldn’t resist it.
And it is in a sense a farewell party.”
“What does that mean?”
“After your wedding I may not see you again for a long time. I’m
only waiting on Enoch’s account. Then I shall be going to Europe for
a year, perhaps more.”
“On business?”
“Y-e-s,” he answered slowly.
They took several more turns without speaking.
“What are your plans?” he asked.
“None that I know of,” she said.
She had stopped. He saw that her gaze was directed at Enoch’s
ancestral iron-stone house below. The fitful glare of the blast
furnaces, lower down, lighted its sombre nakedness and gave it a
relentless, sinister aspect. The windows, which were small and
unsoftened by copings, were like cruel, ferocious eyes in a powerful,
short-haired, suspicious animal.
“Shall you live there?” he asked.
“Yes,” she said, giving him a frowning, startled look, as if he had
surprised her at a disadvantage. She added: “Enoch took me
through it yesterday. The room where he was born,—that will be
mine. The room where his father died is just as it was then. He
thinks we shouldn’t touch it.”
She shivered. He asked her if she was cold. She wasn’t, but on the
next turn past the door she turned and they went in.
Enoch’s idea of marriage was inherited. You take a wife from the
church to the ancestral abode and become jointly responsible with
God for her past, present, future and hereafter, for her body, her
mind, her way with the neighbors, for everything about her save the
separate flame of her individuality. That is vanity. The house is
yours, therefore she must accept it. It was yours before she had any
rights in it, therefore she must get used to it, as she must get used
to you. And why not? If Aaron married would he not take his wife to
the Woolwine Mansion just as it was? Well, what was Aaron’s was
like Aaron and what was Enoch’s was like Enoch, and what a woman
married was what she got.
Enoch rode home with Esther that night in her father’s carriage.
Mitchell had gone home earlier and sent the carriage back. As they
were passing the iron-stone house—fatally then—Enoch asked:
“What do you and Aaron find to talk about?”
“Nothing,” she said.
That was literally the truth. It was with extreme difficulty that they
found anything to say to each other. Never had they carried on an
intimate, self-revealing conversation. There was too much constraint
on both sides. But Enoch could hardly believe that Aaron was under
any circumstances inarticulate, like himself. Or was it that he knew
instinctively if what Esther said was true there lay in that very truth
a deep significance?
Her answer made him seethingly angry. An ungovernable feeling
rose up in him spirally. It was as an adder stinging him in the dark.
He could not seize it, for he knew not what or where it was. He
could not escape from it. The pain was horrible.
Esther knew nothing of these violent emotions. She had no more
intuition of him than he had of her. That sense by which natures
attuned exchange thoughts without words was impossible between
them. Between Esther and Aaron it already existed: it always had.
But it was unacknowledged.
Enoch passed three days without seeing Esther, hoping she might
send for him. On the fourth day he went to dinner and she treated
him as if nothing were the matter. She hardly knew there was. That
made it much worse. Then he flourished the wound by pretending
heroically to conceal it. That method will work only provided the
woman cares and loves the child in her man. Esther did not care.
She refused to discover the hurt. The man’s last recourse is to injure
the woman, to ease himself by hurting her. Enoch became
oppressive. He began to mention the things that should be rendered
unto Cæsar, categorically, gratuitously; he revealed the laws of Gib;
he appointed how the concavities of her life should correspond to
the convexities of his; he spoke of penalties, forfeits and
consequences, and of the ancient legal principle that ignorance of
the statutes is no defence provided the statutes have been duly
published. She listened with wide-open eyes. He believed he inspired
her with admiration for the stern stuff he was made of, and thus
blindly sought his fate.
So his hurt was revenged but in no wise healed.
On the eve of their wedding day, at dinner, Aaron’s name was
pronounced. The invisible circumstances were tragic. Enoch
happened at that instant to be regarding Esther with a sensation
that was new to him and very disturbing. He knew not what to do
with it. Suddenly he had been seized with a great longing for her, a
yearning of the heart toward the fact of her being that was savage,
tender and desolate. He wondered that Esther and her father both
were not aware of this singular and dramatic occurrence. It shook
him like an earth tremor. An impulse to speak, to shout, to cry out
words of fantastic meaning, to rise and touch her, became almost
uncontrollable,—almost. It occurred to him for the first time, like a
blow, that he had never discovered her nature, her true self. He had
not tried. The importance of doing so, the possibility of it, had not
been thought of. But he would. He would begin all over again to get
acquainted with her.
In that moment he loved her.
And it was then,—just then,—that he heard the sound of Aaron’s
name. He could not say which one of them uttered it. The sound
was all he knew. Instantly the hideous, stinging adder upraised from
his depths and began striking at the walls of his breast. Vividly,
stereoptically, as a series of pictures, there flashed across his mental
vision every situation in which he had seen Aaron and Esther
together.
He had been able to control the impulse of love to vent its untimely
ecstasy; his rage he could not govern.
To Esther’s and her father’s amazement he began, with no apparent
provocation whatever, to utter against Aaron defamations of an
extreme and irrevocable character. His manner contradicted the
violence of his feelings. It was self-possessed, one would almost say
restrained; that was his way under stress of emotional excitement.
At no point did he become incoherent. His words were chilled and
came to him easily. One might have thought he was thinking out
loud, very earnestly, in solitude. On his face was that singular Gib
expression, never witnessed before in the Mitchell household,—the
mouth contortion one mistook for a smile. So far as Esther and
Mitchell could see the performance was gratuitous and
premeditated. It had gone far before they realized that his state was
one of passion. But that discovery had no mitigating value. They
made no effort to stop him. He spoke of things that are supposed to
be unmentionable, and of his private intentions, and closed abruptly
with the declaration that Aaron should never be received in his
house as a guest.
“Let that be understood,” he said to Esther. Then he rose from the
table and departed.
Mitchell was stupefied. He looked slowly at Esther. Her face was a
perfect mask.
“Do you know what it means?” he asked.
“Yes,” she said.
“What? What?”
“It’s the only way Mr. Gib has of paying your daughter a
compliment,” she said.
And now Bruno Mitchell suffered another shock. For the first time in
her life Esther rose from the table and left him there.
She went to her room, sent her maid to bed, and sat for a long time
perfectly still, at the core of a maelstrom, her emotions whirling and
seething around her. They were her emotions. She recognized them
as such. Only, they were outside of her. This had always been true.
Even before she understood what it meant, her mother, a stoic,
began to say: “Don’t give way to your feelings. They will swallow
you up. Watch them. If you can see them they cannot hurt you.” So
she had watched them fearfully. To do that she had to put them
outside. She had seen them grow, change and rise until they
engulfed her, and then the only way she could save herself was to
give them that whirling motion, which caused them to incline from
her, as the waters of the whirlpool incline from the center. But it was
harder and harder to keep them whirling and she dared not stop, for
if she did they would swallow her up.
The spectacle became awesome and fascinating, as a maelstrom is,
and there were moments when the perverse impulse to stop,
surrender, cast herself headlong away, was almost irresistible. She
thought of this as equivalent to suicide. And she had for a long time
secretly supposed it would ultimately happen. Now she was terrified
and thrilled by a premonition that it was imminent. Never had the
waters been so mad, so giddy, so nearly ungovernable, so excitingly
desirable.
That is all she was thinking of,—if it may be called thinking,—as she
started up, drew on walking boots, took a shawl and descended the
stairs. In the hallway she met her father. He looked at her with
surprise.
“Are you going out?”
“For a walk,” she said.
“But Esther! ... at this hour ... alone. I—”
“Yes,” she said, waiting. “Do you forbid it?”
There was a note in her voice he had never heard before. She
wished him to say yes, he forbade it. That was why she asked the
question. And if he had said that the whirling flood would have
collapsed at once. That again was all she was thinking. It was a wild,
liberating thought. But instead he took a step toward her and
scrutinized her face.
“Esther, what has happened to you?”
“On the eve of my wedding, for the first and last time, for an hour
perhaps, I shall be Esther herself, alone,” she said.
Since the unprecedented uproar of the inclined waters had begun an
hour before she had not once thought of her wedding. The word of
it, as now it came to her lips, seemed strange and fantastic, and yet
she had made no resolve against it.
Her father stood aside and she passed out.
Half an hour later the knocker sounded and Mitchell himself went to
the door, expecting to receive Esther. There was Enoch. He asked to
see her.
“She has gone for a walk,” said Mitchell. “Won’t you come in and
wait? She can’t be long returning.”
Enoch hesitated and turned away, saying he might have the good
luck to meet her.
He had come to mend the impression he was conscious of having
left behind him. At least that was the ostensible reason. That was
what he would have said. The fact was that the adder had suddenly
slunk away, and once more came that feeling for Esther which was
so new and irrational and caused his heart to stagger back and
forth. It was stronger than before,—stronger than pride. He could
scarcely breathe for the ache of wanting to see her again that
night....
Esther turned first toward the river path, changed her direction
aimlessly, walked for some distance toward the limestone quarry,
then suddenly swung around, passed the blast furnaces, and
presently, only her feet aware of how they came there, she was high
on the mountain path to Throne Rock. She had been walking too
fast. Her breath began to fail. She sat on a log to rest. The moon
came up. The log was the same fallen tree trunk on which she sat
with her dogwood flowers the day Aaron turned round, came back,
and invited her to a farewell dinner party. She knew it all the time.
The scene restored itself, with all the feelings it had evoked, and she
did not push them back. They detached themselves from the
whirling mass and touched her. There was a moment in which she
could not remember anything that had happened since; and in that
moment, as an integral part of it, the figure of Aaron appeared,
walking toward her from above, exactly as before.
She sat so still he might almost have passed her. He did not start.
For a long time he stood looking at her. She did not move. He could
not see her face. Then without speaking he sat beside her, at a little
distance, on the log. The tree frogs informed on one another—peep-
ing—peep-ing. A dry twig falling made a crashing sound. Far away
below, at regular intervals, shrill whistle blasts denoted stages in the
ring of smelting alchemies.
Aaron spoke.
“What day is tomorrow?”
“I don’t know,” said Esther.
They were silent until the whistle blew again.
“At ten o’clock,” said Aaron.
“At ten o’clock,” said Esther.
The exchange of wordless thoughts went on and on, and Aaron was
expecting what she said.
“I do not love him.”
“He loves you,” said Aaron.
“Does that so much oblige the woman?” Esther asked.
“The woman is obliged,” he said, “she is ... unless——” He stopped.
“Aaron,” she said, “tell me this. How do friends regard each other’s
wives and sweethearts?”
“Sweethearts almost the same as wives,” he said.
“So that if one loved the sweetheart of a friend he could not tell her
that?”
“No, he could not.”
“Not even if he knew the sweetheart did not love the friend?”
“No,” said Aaron.
“Then should the woman tell?”
“Tell whom?” asked Aaron, trembling.
“The friend ... the other man,” said Esther.
Aaron slowly dropped his head between his hands. She could feel his
body shake. A roaring blackness filled her eyes. She rose and would
have gone, but he enfolded her, with arms that touched her lightly,
almost not at all at first, then tightened, tightened, tightened, until
her life was crushed to his, and all the waters fell.
He put her off at arm’s length to see her better.
“Through all consequences ... forever ... to finality,” he said.
And she was satisfied.
How long they stood so, either thus or as it was, gazing one upon
the other, with no words to say,—how long they never knew. A
sound of footsteps very near broke their ecstasy, and there stood
Enoch.
They had no sense of guilt. They were shy and startled from the
shock of coming back to earth.
Enoch stood there looking at them. Aaron moved, drawing Esther’s
form behind him.
At that Enoch turned away and laughed.
Twenty paces on his way he laughed again.
When he was out of sight he laughed.
At intervals all the way down the mountain he stopped to laugh.
The sound of his laughter reverberated, echoed, swirled, went and
returned, filled the whole valley, blasting the night. Then when he
was far off he uttered a piercing scream. It rose on the air like a
rocket, hissed, burst with a soft splash and pitched off into space,
and the world for a moment was deathly still. The tree frogs were
the first to recover and began frantically to fill up the void.
Aaron touched Esther. They descended. She inquired of him nothing;
he informed her of nothing. They did not speak again for hours.
They walked to the Woolwine mansion. He called for horses, a light
vehicle, and wraps. And all that night they drove, past the setting
moon, into the darkness, through the dawn, toward Wilkes-Barre.
Next day at noon they were married.
VII
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookultra.com