100% found this document useful (3 votes)
419 views

Immediate download Essentials of C Programming with Microsoft Visual Studio Farzin Asadi ebooks 2024

C

Uploaded by

imtiajvakto83
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (3 votes)
419 views

Immediate download Essentials of C Programming with Microsoft Visual Studio Farzin Asadi ebooks 2024

C

Uploaded by

imtiajvakto83
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Get ebook downloads in full at ebookmeta.

com

Essentials of C Programming with Microsoft Visual


Studio Farzin Asadi

https://ebookmeta.com/product/essentials-of-c-programming-
with-microsoft-visual-studio-farzin-asadi/

OR CLICK BUTTON

DOWNLOAD NOW

Explore and download more ebook at https://ebookmeta.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Essentials of Arduino™ Boards Programming: Step-by-Step


Guide to Master Arduino Boards Hardware and Software 1st
Edition Farzin Asadi
https://ebookmeta.com/product/essentials-of-arduino-boards-
programming-step-by-step-guide-to-master-arduino-boards-hardware-and-
software-1st-edition-farzin-asadi/
ebookmeta.com

Target C#: Simple Hands-On Programming with Visual Studio


2022 1st Edition Gerard Byrne

https://ebookmeta.com/product/target-c-simple-hands-on-programming-
with-visual-studio-2022-1st-edition-gerard-byrne/

ebookmeta.com

ABCs of Electronics 1st Edition Farzin Asadi

https://ebookmeta.com/product/abcs-of-electronics-1st-edition-farzin-
asadi/

ebookmeta.com

The Thinking Woman Julienne Van Loon

https://ebookmeta.com/product/the-thinking-woman-julienne-van-loon/

ebookmeta.com
Recent Trends in Analysis of Images Social Networks and
Texts 10th International Conference AIST 2021 Tbilisi
Georgia December 16 18 2021 Revised Selected Papers Evgeny
Burnaev
https://ebookmeta.com/product/recent-trends-in-analysis-of-images-
social-networks-and-texts-10th-international-conference-
aist-2021-tbilisi-georgia-december-16-18-2021-revised-selected-papers-
evgeny-burnaev/
ebookmeta.com

My First Trip on an Airplane Katie Kawa

https://ebookmeta.com/product/my-first-trip-on-an-airplane-katie-kawa/

ebookmeta.com

The Essential Peter S Beagle Volume 1 Lila the Werewolf


and Other Stories 1st Edition Peter S. Beagle

https://ebookmeta.com/product/the-essential-peter-s-beagle-
volume-1-lila-the-werewolf-and-other-stories-1st-edition-peter-s-
beagle/
ebookmeta.com

T T Clark Companion to Henri de Lubac 1st Edition Jordan


Hillebert

https://ebookmeta.com/product/t-t-clark-companion-to-henri-de-
lubac-1st-edition-jordan-hillebert/

ebookmeta.com

Cambridge Lower Secondary Science Workbook 8 2nd Edition


Jones

https://ebookmeta.com/product/cambridge-lower-secondary-science-
workbook-8-2nd-edition-jones/

ebookmeta.com
On Wings Her Secret Menagerie 2 1st Edition Katelyn
Beckett

https://ebookmeta.com/product/on-wings-her-secret-menagerie-2-1st-
edition-katelyn-beckett/

ebookmeta.com
Farzin Asadi

Essentials of C Programming with


Microsoft® Visual Studio®
Farzin Asadi
Department of Electrical and Electronics Engineering, Maltepe
University, Istanbul, Turkey

ISBN 978-3-031-35710-7 e-ISBN 978-3-031-35711-4


https://doi.org/10.1007/978-3-031-35711-4

© The Editor(s) (if applicable) and The Author(s), under exclusive


license to Springer Nature Switzerland AG 2023

This work is subject to copyright. All rights are solely and exclusively
licensed by the Publisher, whether the whole or part of the material is
concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in
any other physical way, and transmission or information storage and
retrieval, electronic adaptation, computer software, or by similar or
dissimilar methodology now known or hereafter developed.

The use of general descriptive names, registered names, trademarks,


service marks, etc. in this publication does not imply, even in the
absence of a specific statement, that such names are exempt from the
relevant protective laws and regulations and therefore free for general
use.

The publisher, the authors, and the editors are safe to assume that the
advice and information in this book are believed to be true and accurate
at the date of publication. Neither the publisher nor the authors or the
editors give a warranty, expressed or implied, with respect to the
material contained herein or for any errors or omissions that may have
been made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.
This Springer imprint is published by the registered company Springer
Nature Switzerland AG
The registered company address is: Gewerbestrasse 11, 6330 Cham,
Switzerland
In loving memory of my father Moloud Asadi and my mother Khorshid
Tahmasebi, always on my mind, forever in my heart.
Preface
C is a general-purpose procedure-oriented computer programming
language. C programming language was developed in 1972 by Dennis
Ritchie at Bell Laboratories. It was named “C” because it is an offspring
of BCPL (Basic Combined Programming Language) which was
popularly called “B” language. C was invented to write an operating
system called UNIX. The UNIX OS was totally written in C.
C is a procedure-oriented language. Procedures, also known as
routines, subroutines, or functions, simply consist of a series of
computational steps to be carried out. In procedural programming
model, the problem is break down into some small tasks and one or
more procedures are written to do each task. Then written procedures
are called to obtain the problem solution. Another programming model
is Object Oriented Programming (OOP). OOP can be defined as a
programming model which is based upon the concept of objects.
Objects contain data in the form of attributes and code in the form of
methods. OOP is not supported in C. C++ was developed in the 1980s by
Bjarne Stroustrup as an extension of C. C++ can be considered as the
OOP version of C.
C has now become a widely used professional language. Some of the
advantages of C language are:
1. Learning C programming is easy: C language has a small number
of keywords and symbols to learn. C language has one of the
simplest syntax in comparison to another programming languages.

2. C has enriched library for built-in functions: C has many pre-


written, ready-to-use libraries which contain useful functions to do
a specific task. Presence of these libraries eliminates the need to
write the code from the ground up.

3. Compiled C code has a fast execution speed: C code executes


faster than other programming languages such as Java, Ruby, PHP,
etc.

4. C language supports dynamic memory allocation: In C Language


you can allocate memory dynamically or statically. In static memory
allocation, the allocation of memory performs at the compile time.
In dynamic memory allocation, the allocation of memory performs
at the execution or run time.
Generally, C programming is the first programming course that
students of engineering and science take. This book is written to
support a first course on C programming language. There is no
prerequisite for this book.
This book contains many examples to show how different tasks can
be done in C. All of the given examples are tested in Microsoft Visual
Studio® to ensure that they work properly without any error.
I hope that this book will be useful to the readers, and I welcome
comments on the book.
Farzin Asadi
Istanbul, Turkey
Contents
1 Installation of Microsoft® Visual Studio®
1.​1 Introduction
1.​2 Installation of Visual Studio
1.​3 Entering the C Code to Visual Studio
1.​4 Running the C Code with Visual Studio
1.​5 Errors in the Code
1.​6 Color of Keywords in Visual Studio
1.​7 Comments
1.​8 C Is a Case Sensitive Language
Further Reading
2 Basics of C Programming
2.​1 Introduction
2.​2 Primary Data Types in C
2.​3 Creating Variables
2.​4 C Programming Naming Conventions
2.​5 Printing on the Screen
2.​6 Overflow of Variables
2.​7 size_​t Data Type
2.​8 Minimum and Maximum of Primary Data Types
2.​9 Taking a Value From the User
2.​10 Blocks
2.​11 Global Variables
2.​12 Constants
2.​13 Enumeration
2.​14 typedef Keyword
Further Readings
3 Conditional Statements
3.​1 Introduction
3.​2 if Command
3.​3 if-else Command
3.​4 Conditional Ternary Operator
3.​5 Logical Operators
3.​6 Nested if Statements
3.​7 switch-case Statement
Further Reading
4 Loops
4.​1 Introduction
4.​2 for Loop
4.​3 break Command
4.​4 continue Command
4.​5 while Loop
4.​6 Infinite Loop
4.​7 do-while Loop
Further Reading
5 Arrays
5.​1 Introduction
5.​2 Defining an Array
5.​3 Arrays and Pointers
5.​4 Length of an Array
5.​5 Removing an Element from the Array
5.​6 2D Arrays
5.​7 Size of 2D Arrays
5.​8 malloc Function
5.​9 calloc Function
Further Reading
6 Functions
6.​1 Introduction
6.​2 Definition of a Function
6.​3 Pass by Value
6.​4 List of Functions
6.​5 void Functions
6.​6 Scope and Lifetime of Variables
6.​7 Function to Convert Fahrenheit to Celsius
6.​8 Combinations (nCr) Calculator
6.​9 Password Checker
6.​10 Heads and Tails
6.​11 Cost of a Hotel
6.​12 Fibonacci Sequence (Iterative Approach)
6.​13 Fibonacci Sequence (Recursive Approach)
6.​14 Recursive Factorial
6.​15 Recursive Product
6.​16 Recursive Max and Min
6.​17 Static Variables
6.​18 Pass by Reference
6.​19 Passing an Array to a Functions
6.​20 Functions with Variable Number of Arguments
6.​21 Entering the Functions to Separate Files
6.​22 extern Keyword
Further Reading
7 Some Useful Functions
7.​1 Introduction
7.​2 Running an .​exe File
7.​3 Playing a .​wav File
7.​4 main Arguments
7.​5 exit Function
7.​6 atexit Function
7.​7 Reading the Mouse Pointer Position
7.​8 Timer
7.​9 Shutting Down the Computer
Further Reading
8 Pointers
8.​1 Introduction
8.​2 Address-of (&​) Operator
8.​3 Pointers
8.​4 Dereferencing (*) Operator
8.​5 Pointer Arithmetic
8.​6 Call by Reference
8.​7 malloc Function
8.​8 NULL Pointer
8.​9 void Pointer
Further Reading
9 Structures and Unions
9.​1 Introduction
9.​2 Defining a Structure
9.​3 typedef Keyword
9.​4 Copying the Content of a Structure Variable Into Another
Structure Variable
9.​5 Functions with Structure Arguments
9.​6 Array of Structures
9.​7 Arrow Operator
9.​8 Dereferencing a Pointer to a Structure
9.​9 Unions
9.​10 Pointer to a Union
Further Reading
10 Mathematical Functions
10.​1 Introduction
10.​2 Precedence of Operators
10.​3 Remainder of Division
10.​4 sizeof Operator
10.​5 Type Casting
10.​6 Mathematical Constants
10.​7 Power Function
10.​8 Square Root Function
10.​9 Cubic Root Function
10.​10 Logarithm Function
10.​11 Trigonometric Functions
10.​12 Inverse Trigonometric Functions
10.​13 Hyperbolic Functions
10.​14 Inverse Hyperbolic Functions
10.​15 Exponential Function
10.​16 Rounding and Truncating Numbers
10.​17 floor and ceil Functions
10.​18 fabs and hypot Functions
10.​19 Generation of Random Numbers
10.​20 Floating Point Numbers
10.​21 Complex Functions
10.​22 Binary and Hexadecimal Numbers
10.​23 Bitwise Operation
10.​24 GNU Scientific Library
Further Readings
11 String Processing
11.​1 Introduction
11.​2 Defining a String
11.​3 String Inputs
11.​4 strlen Function
11.​5 strcpy Function
11.​6 strncpy Function
11.​7 memset Function
11.​8 memcpy Function
11.​9 memmove Function
11.​10 strcmp Function
11.​11 strncmp Function
11.​12 memcmp Function
11.​13 strcat Function
11.​14 strncat Function
11.​15 strtok Function
11.​16 strcspn Function
11.​17 strspn Function
11.​18 atoi Function
11.​19 atof Function
11.​20 sscanf Function
11.​21 sprintf Function
11.​22 strchr Function
Further Reading
12 Character Processing
12.​1 Introduction
12.​2 isalnum Function
12.​3 isalpha Function
12.​4 isdigit Function
12.​5 iscntrl Function
12.​6 ispunct Function
12.​7 isspace Function
12.​8 islower Function
12.​9 isupper Function
12.​10 tolower Function
12.​11 toupper Function
12.​12 getch Function
Further Reading
13 Time and Date
13.​1 Introduction
13.​2 Making Delay with Sleep Function
13.​3 Time Measurement
13.​4 time Function
13.​5 Date and Time
13.​6 gmtime Function
13.​7 localtime Function
13.​8 asctime Function
13.​9 strftime Function
13.​10 _​strtime and _​strdate Functions
Further Reading
14 Sorting and Searching
14.​1 Introduction
14.​2 Bubble Sort
14.​3 Insertion Sort
14.​4 Quick Sort Algorithm
14.​5 Quick Sort for Integer Values
14.​6 Quick Sort for Double Values
14.​7 Quick Sort for Strings
14.​8 Binary Search
Further Reading
15 File Processing
15.​1 Introduction
15.​2 Creating a New File
15.​3 Append Mode
15.​4 ftell Function
15.​5 fprintf Function
15.​6 fseek Function
Other documents randomly have
different content
"It is certainly keener than London," she replied; "but you will soon
get used to that, and begin to feel the good of it. I have enjoyed my
brisk walk."

Then she told me she had been to the village to see a poor woman
whose husband had died suddenly.

"Oh, auntie," I said, feeling shocked, "that was very sad for you."

"Oh, no," she responded. "I felt that I must go to her, because, you
see, I can understand. It helped her to feel that I had known the
same shock of trouble and was enduring the same loss."

Certainly, if ever woman had "a heart at leisure from itself," auntie
had. She would make even her sorrows helpful to others. It was with
wonder that I realised how deeply she had loved Uncle George and
how truly she mourned him. To us younger people he had always
seemed a disagreeable old man, and most persons, I fancy, found it
difficult to get on with him. But Aunt Patty's was the love which
"taketh no account of evil," but wraps the one beloved in a mantle of
goodness and grace which others judge misplaced, though it may fit
better than they think. I often marvelled at her capacity for love, and
the conclusion to which it invariably led me was that I could never
love any one in that way.

Later aunt discussed with me her plans for the future. She told me
she had decided to sell all the land with the exception of the pastures
immediately adjoining the house, and all her cattle except two cows,
which would supply her house with milk and butter. She would keep
one horse to draw the wagonette, which would be needed to take
people to and from Chelmsford, and a pony for the little chaise. One
man-servant would be necessary to drive and look after the stable,
and the old gardener also would be retained.

"The garden must not be neglected," said Aunt Patty, "for I shall rely
on that to supply us with fruit and vegetables for the table. People
have a right to expect good rural fare when they come to sojourn in
the country, and I mean that my guests shall have it. I have little fear
that cook will not consent to remain with me, for she has often
lamented that this place gave her so little opportunity of displaying
her talents. She is really clever at made dishes and sweets, but, as
you know, your uncle's health obliged him to be very careful in his
diet, and I never cared to have anything on the table that might tempt
him to break the restrictions imposed by his doctor. But now, if I were
so fortunate as to get my house full of 'paying guests,' I should wish
her to make plenty of dainty dishes to set before them."

"How many guests could you take, auntie?" I asked.

"Let me see," she said; "there are seven bedrooms besides the
servants'. Taking away yours and mine, five are left for the guests;
but they are such good-sized rooms that two beds could be placed in
most of them. I must hope to have visits from friends and relatives
who will be willing to share a room. I could easily accommodate ten
persons in that way, and that, I think, would be as many as I should
desire to have. I don't know what Jenny would say to waiting upon
so many, but, of course, I should help her as much as I could."

"And I would, too," I said, as in duty bound, though in truth I felt very
reluctant to take up domestic tasks, and disliked the idea of "Gay
Bowers" being invaded by ten strangers. But I had sense enough to
know that if I hated the thought of "all sorts and conditions" of people
—within certain limits—being free to make their home in the dear old
house, it must be inexpressibly more painful to Aunt Patty herself.
But I could see that she fought against the feeling and was resolved
to face the inevitable bravely. It was the only way in which she could
remain in the home she loved, and it was not clear what she could
do if she gave it up.

"I have come to think that this is God's will for me," she said quietly.
"I have put my future into His hands and asked Him to show me the
path He would have me tread. You know I believe that He will give
us His guidance, if we seek it, even in the smallest details of our life.
Perhaps it is the door into new service for Him. I should like to
welcome some of His worn and weary ones to rest here."
The smallest details of our life the objects of God's care! That was a
strange thought to me. I could hardly receive it, yet I felt then, and
know assuredly now, that it is an uplifting and ennobling conception
of life, and one that makes the whole of it sacred and grand. Could it
be that there was a divine purpose in the ill-health which had
frustrated my hopes and brought me to this quiet, out-of-the-world,
country place to share my aunt's changed lot? I felt awed as I
contemplated the possibility, and my heart put up a prayer that it
might be for good that I had come here. There was in my heart a
vague longing to know more of God. Absorbed in my intellectual
work, I had neglected the study of God's Word and suffered my
prayers to become merely formal. Even on Sundays, I had often
read for my examination, and both body and spirit had suffered in
consequence. I knew now what a mistake I had made.

In the afternoon Aunt Patty's solicitor drove out from Chelmsford and
kept her occupied with business matters for more than an hour. I was
not dull however, for Jack Upsher came to see how I was. He
persuaded me to put on over-shoes and one of auntie's thickest
wraps, and go round the garden with him. Together we revisited all
the old nooks which had been the delightful haunts of our childhood,
and I had great fun in recalling some of our most foolish adventures,
and the plights into which they brought us. Then we went into the
house and chatted by the fireside till aunt brought in Mr. Crowther to
have tea. When he had gone, Jack still lingered, till Aunt Patty rather
pointedly reminded him of his studies, upon which he reluctantly took
his departure.

"I was grinding away for three hours this morning," he grumbled,
"and now I deserve a little relaxation."

"Which you have had," aunt said promptly. "So you will be ready for
another three when you reach home."

"Why, I declare you are as bad a slave-driver as the governor,"


retorted Jack, "and with this fearful example—" indicating me—"of
the dangers of over-work before your eyes."
Aunt Patty gave a little laugh.

"Oh, Jack, there is no such danger in your case!" she said, shaking
her head. "I almost wish there were."

"What!" he exclaimed. "You would like to see me with a pale, lank


visage and reduced to a long-drawn-out shadow! Who would have
believed you were so heartless?"

"I have no fear of seeing you 'sicklied o'er with the pale cast of
thought,'" she replied, "and I do want you to work so steadily as to
make a second failure impossible."

"I will indeed. I have promised it, and I mean to keep my promise,"
he said resolutely, and was gone.

Aunt Patty smiled and then sighed as she looked after him.

"Poor dear fellow!" she said. "I wish he were not so idle, for there is
much that is good in him. If only his father understood him better!"

"Don't they get on well together?" I asked.

She shook her head.

"They never could. You must remember how severe the Vicar was
with him when he was a boy."

"I know he liked always to be here," I said, "and never seemed to


care to go home."

"Just so; the poor lad never knew a mother's love, nor what it is to
have a happy home," said my aunt. "Mr. Upsher's housekeeper is a
very worthy woman, but not in the least fit to look after a young
fellow like Jack. The Vicar cares only for his books. He likes to shut
himself up in his study, and is almost a stranger to his son, except
that he has a keen perception of his faults. And yet he is a good
man, and, I am sure, loves Jack in his way."
"Jack is very fond of you, auntie," I said. "You have been almost a
mother to him."

"I have always felt a great longing to 'mother' him," she said. "People
talk against step-mothers, but it might have been a happy thing for
Jack if he had had a step-mother."

"Does the Vicar still preach such dry sermons?" I asked.

"I cannot say that they have improved, Nan," replied my aunt with a
smile.

"Humph," I said, "then we cannot offer the 'paying guests' the


attraction of good preaching, though they will be able to worship in a
beautiful old church."

Upon which we reverted to the subject we were destined to discuss


again and again during the ensuing weeks.

Aunt decided to lose as little time as possible in preparing for the


reception of her guests. She hoped that she might be able to secure
some for Easter, which fell early this year.

As she had prophesied, the strong, fresh country air proved an


excellent tonic for me. My nerves regained tone; I slept and ate well,
and soon felt so strong that I was inclined to think slightingly of Dr.
Algar's diagnosis of my case. I enjoyed the spell of sharp, clear
weather we had in February. Jack and I had some delightful skating
on the river. I was rather out of practice, for I had not skated for
years, and I was very timid at first, but with his help I soon
conquered my fears, and enjoyed immensely the excitement of
skimming over the silvery ice with my arm linked in his.

Aunt and I were very busy as Easter drew near. We had to re-
arrange and re-furbish the rooms. Many a shopping expedition took
us to Chelmsford. Of course, it was necessary to advertise for our
boarders, and the drawing-up of the advertisement cost us much
thought, while it evoked many absurd suggestions from Jack. We
were anxious to make the most of our attractions, yet there was
danger in being too explicit, since what would attract one person
might induce another to stay away. It is curious how many ways
there are of putting things, and how various were the forms I drew up
for aunt's consideration. I made my head ache with the effort to put a
great deal in a few words. At last we were satisfied with something
like this:

"Paying guests received in old country house in pleasant rural


neighbourhood. Fine air, excellent farm produce, and all home
comforts. Large garden with tennis and croquet lawns. Good fishing.
Desirable residence for any needing quiet and rest."

It seems simple enough as I write it now, but, oh, the deliberation


with which we weighed each word! Aunt Patty was for describing her
home as "desirable for invalids," but I was certain that would frighten
away every healthy person under sixty, and I did want some young
people to come.

I made several copies of this advertisement, and sent them to such


of the London newspapers as we judged best suited for our purpose.
Aunt also wrote to many of her friends and acquaintances, telling
them of the attempt she was making, and asking their kind
assistance. Then we waited, I eagerly, she anxiously, for the result.
She hoped to hear from gentle widows, worn-out governesses and
the like. I hardly knew what to expect. But our first response when it
came was a surprise to us both.

CHAPTER V
A RESPONSE TO THE ADVERTISEMENT
"I BEGIN to think that the money I have spent on advertisements is
just money thrown away," said Aunt Patty, rather ruefully one
morning as we sat in the breakfast-room at the close of our early
meal.

I looked up from the letter which had absorbed my attention. It was a


lively and lengthy epistle from Peggy, giving me all the home news,
and I had been so delighted to get it that I failed to observe that the
post had brought my aunt nothing. It was very disappointing. During
the whole of the past week, the advertisement to which we had given
so much thought had appealed to people from the columns of
London newspapers, and not a single person had been moved to
respond to it. To be sure, the weather had not been such as to make
the idea of visiting the country attractive. The March winds had been
sharp and boisterous, and sudden squalls were often accompanied
by sleet.

"People are waiting till the weather becomes more spring-like," I


said. "It is a pity that it continues so cold, and Easter falling next
week."

"Yes," said Aunt Patty with a sigh. "I am afraid I have been in too
great a hurry. It would have been better to have waited a few weeks
before advertising."

The past week had been a trying time for Aunt Patty. Certain
business transactions had taken place. The greater part of the land
which had belonged to Uncle George, and his father before him, was
now the property of Squire Canfield. He had also purchased a good
deal of the farm stock, and the rest had been sold by auction at
Chelmsford. I hardly realised all that this meant to Aunt Patty. It did
not seem to me to make much difference to her, since the house and
garden and the grounds immediately adjoining still belonged to her.
But I knew she had felt it deeply, and now, as I saw her troubled air, I
tried to comfort her.
"It seems rather warmer this morning," I said. "I believe the weather
is going to change. We shall have some applications soon, auntie, I
feel sure. Would you like me to go into Chelmsford this afternoon,
and inquire at the post-office?"

We had only one postal delivery a day at "Gay Bowers," so if we


went into town we never failed to visit the post-office, that we might
obtain any letters that might have arrived by a later post.

"I am afraid it would only be another disappointment," said Aunt


Patty, "and it is hardly worth while to have the horse and trap out for
that."

"How I wish I had a bicycle!" I said. "Now that the winds have dried
the roads, I could spin into Chelmsford and back in no time."

"Then you can ride?" aunt said.

"Oh, yes; Olive taught me, and she often lends me her bicycle—she
is very good-natured about it. You know Mrs. Smythe gave her one
because she thought she did not take sufficient exercise."

"I wish I could give you one, my dear," said Aunt Patty gently.

"Oh, auntie, don't say that!" I replied. "I don't care so much about it,
only I thought it would be convenient just now if I had one."

"I tell you what you could do if you liked, dear," said my aunt, "not
that I think it will make any difference as far as the advertisement is
concerned, but there is a business letter I am anxious to receive
which may come in by the second post. You might step over to the
Vicarage, and ask Jack to call at the post-office for us as he comes
back from Chelmsford."

"That I will," I said as I rose from the table, "and I must go at once or
Jack will have started. He has to be at his tutor's by ten."
I put on my hat and coat, and went out. The breeze which met me
and blew out my skirts was fresh and strong, but its keen edge had
gone. The sun was breaking through the ragged grey clouds that
were scudding across the sky. Its rays glorified a bed of crocuses,
and by the gate, sheltered by the high garden wall, I found the first
daffodil. I had been watching for days the green, swelling buds, but
not till now had I seen the gleam of gold. Stooping to lift the drooping
head, I gazed at it with exquisite delight. How different it was in its
dainty freshness from any daffodil I had ever bought in London!

"I shall learn to love gardening if I stay here long enough!" I said to
myself as I went on my way.

Turning to the right and following the winding of the lane, I came in a
few minutes to Greentree Church, a picturesque, red-bricked
building with a pointed steeple. A peaceful churchyard lay about it,
with many old tombstones, grey and defaced by age, some bearing
curiously worded epitaphs. A little beyond the church was the
Vicarage, a beautiful old house, built of red brick, which had long
taken on the rich, mellow hue of age. A magnificent cedar adorned
the lawn, and an almond tree, breaking into blossom, overhung the
gate. The trees and shrubs which grew within were rather too
luxuriant, a sign of bad gardening, for flowers could not flourish
beneath their heavy shade, and the garden had rather a neglected
appearance. The Vicar cared nothing for flowers, nor did Jack
concern himself about their culture, though he always evinced what I
believed to be an unfeigned interest in Aunt Patty's garden.

The phaeton stood before the door of the house as I approached.


Jack's dogs ran barking to meet me, and he came quickly from the
house to see why they were making such a commotion.

"Oh, Nan, you are an early visitor—but only just in time!" he


exclaimed, looking as pleased as if he had not seen me for a year,
whereas he had been at "Gay Bowers" on the previous day. Jack
was the most friendly and sociable of beings. It was a striking
instance of the irony of fate that such a one should share this quiet
home with a father who was always immersed in his books. Aunt
Patty's guests, when they came, would have a welcome from Jack.

"Oh, are you going to drive?" I said. "I thought you would cycle to
Chelmsford this morning."

"What—with this wind in my teeth all the way?" he replied. "That


would be rather too much for me. I might have ridden Bess, only, you
see, the pater is going up to town to-day, so I shall drive him to the
station before going to Medley's."

As he spoke, the Vicar came out of the house. He was an elderly


man, tall, with bowed shoulders, which bore witness to the habits of
a scholar. He greeted me kindly, but in an absent-minded fashion.
He rarely seemed to give his whole mind to the person he
addressed, an unfortunate defect in a clergyman. He did, however,
so far recognise my individuality as to inquire for Aunt Patty. It was
Jack who asked whether we had had any response to the
advertisement.

"Any bites?" was his concise way of putting it.

I shook my head, then hastened to make my request that he would


call for us at the post-office on his way home.

"Of course I will," he said promptly, "and I will bring you good luck,
too, in the face of an offer from a most desirable 'paying guest.'"

"That is more than you possibly can promise," I replied.

"Oh, you don't know. I have a presentiment that I shall find


something good for you at the post-office," he returned. "Come and
meet me, Nan, and see if I am not right. I shall walk back, for the trap
will have to remain in Chelmsford for father. Meet me half-way."

"I dare say," I said, "that would mean a walk of five miles. I should
have thought nothing of it a year ago, but now—although I am ever
so much stronger than when I came down—"
"Of course! How thoughtless of me!" he broke in. "Come as far as
the Wood End Oaks then; but no farther by the road, for I shall take
the short cut."

"Perhaps," I said, "I do not promise," but I meant to go all the same.

Meanwhile the Vicar had climbed into the phaeton.

"The air is milder to-day," he said as he arranged his muffler about


his throat.

"Oh, it is spring at last," I said joyfully; "I have found a daffodil in


bloom."

"Ah!" he said vacantly, and I saw that a golden daffodil was no more
to him than a yellow primrose was to Peter Bell.

I bade them good-morning and turned homeward, for I could see that
the Vicar was in a fidget to be off. As I went up the lane the phaeton
overtook me. Jack lifted his cap and cried rashly, "I'll bring you one, I
promise you, Nan."

Jack usually lunched in town and got home some time in the
afternoon. When I started about half-past three for the rendezvous,
auntie told me to be sure to bring him in to take tea with us.

"There will be no one looking for him at home," she said.

Not till then did it strike me that Jack was perhaps walking back on
purpose to gratify us, and that, if I had not asked him to call for our
letters, he would have awaited in Chelmsford his father's return by
the six o'clock train. It was just like Jack to give himself that trouble
on our behalf, for he was the most good-natured fellow in the world;
but I was vexed that I had not thought to tell him that the letters were
of no consequence, and that very likely there would be none. When I
remarked this to aunt, all she said was:
"Oh, the walk will do him good, and you too, Nan, if you do not go
too far."

It was a lovely afternoon for a walk. The fresh breeze was most
exhilarating, though it blew almost too strongly for me as I crossed
the common. A little beyond this the road dipped suddenly, and to
the left a wood bordered it for about a hundred yards. The old,
gnarled trees which overhung the road were known as the "Wood
End Oaks." A stile gave access to the wood, and a path running
through it and across two meadows beyond was a short cut, which
for pedestrians considerably shortened the way from Chelmsford.

I was not ill-pleased to find that I had reached the stile before Jack,
for I was glad to seat myself upon it. I had not sat there many
minutes when I saw Jack coming towards me through the wood. He
gave a shout as he caught sight of me, and waved on high a letter.

"I was right, Nan," he cried, coming up. "I told you I should be sure to
find a reply, and here it is! There can be no mistake about this." And
he laid on my knee a letter directed in a small but clear hand to the
"Proprietress, Gay Bowers, Greentree, near Chelmsford."

"Oh, yes, this is one at last," I said eagerly. "No ordinary


correspondent would address auntie in that way; but of course the
advertisement does not give her name. The handwriting looks like a
man's."

"Oh, I don't know," said Jack; "many girls affect that style of writing."

"This is not a girl's writing," I said. "I like it. It is strong and original,
and betokens intellectual tastes."

"Nonsense, Nan," said Jack; "you surely don't believe in telling


people's characters by their handwriting and all that rubbish."

"It is not rubbish," I replied calmly. "I have often judged unknown
persons by their handwriting, and I have seldom found myself
mistaken in my conclusions."
"It is all pure imagination," said Jack, who had seated himself beside
me on the stile in order to examine the envelope at his ease. "I may
not be a genius—I rather think I am not—but at any rate I can make
better G's and B's than that fellow, if it is a fellow. Where are you off
to in such a hurry, Nan?"

"Why, home, of course," I said, as I sprang down, "to take Aunt Patty
this letter and hear what it says."

"Ah! I guessed curiosity was moving you," he said.

"You have none, of course," I retorted. "If you had, it might soon be
gratified, for auntie told me to invite you to take tea with us."

"I shall be most happy," said Jack, and he looked so pleased that I
felt sure he was as curious concerning the contents of that envelope
as I was.

We found Aunt Patty in the drawing-room. Our eager faces told her
we brought news ere I gave her the letter.

It was not long, and she quickly scanned it; then said as she handed
it to me:

"A nice letter, but not at all the kind of application I expected. The
writer is a gentleman."

"I knew it," I said with a glance at Jack, and proceeded to read the
following:

"Dear Madam,—I have recently returned from India,


ill-health having compelled me to resign the
professorship in an Anglo-Indian college which I have
held for nearly five years. I am still somewhat of an
invalid and find London life far too exhausting for my
nerves. My physician advises me to live in the country
for some months. Your advertisement seems to offer
me the kind of home I desire, where I could pursue my
studies in quiet and enjoy the advantages of a country
life while keeping in touch with London. Will you kindly
let me know whether you can give me a large and airy
bedroom which I could also use to some extent as a
study? Please state exactly on what terms you could
offer it. A reply at your earliest convenience will greatly
oblige."

"Yours faithfully,"
"ALAN FAULKNER."

"Oh, auntie!" I exclaimed as I put down the letter. "To think of our
having a professor here! It seems to me rather alarming."

"I should not have thought you would have found it so," said Jack. "I
expect he is quite harmless."

"I dare say he will be absorbed in his studies and won't expect much
from us in the way of entertainment," said Aunt Patty. "He is human,
if he is a professor, and I believe I can make him comfortable. The
room above this is large and airy enough, I should think. We could
easily screen off the bed and make it look like a sitting-room."

"You thought of putting two beds there," I said. "Yes, but I may have
no application for a double-bedded room," she replied, "and he ought
to have a large room if he is going to spend so much of his time in it.
He will be a man to suit your father, Jack. I dare say they will draw
together."

"I do hope for your sakes that he may not be so absent-minded as


my dear progenitor," said Jack. "I am anxious as to what escapade
he may commit when he is out of my sight. Did I ever tell you, Nan,
how he once appeared wearing a girl's hat?"

"Jack, what can you mean?" I cried.


"It is a fact," he said. "It happened two years ago last summer. He
had been taking a little holiday and visiting a cousin in Wales. I came
up from school and met him at Paddington, that we might go home
together. Imagine my astonishment when I saw him step out of the
train wearing a round straw hat with long ribbon streamers at the
back! How the people did stare!" "'Why, dad,' I said, 'whatever have
you on your head? Is that the latest style for clerics?'"

"If you'll believe me, till I spoke, he had no idea there was anything
wrong. He had donned a straw hat with his holiday garb. The day
being hot, he took off his hat in the train, and a young girl seated in
the same compartment also removed hers. He had to change trains
rather hurriedly at a certain junction, and in his haste put on her hat
in mistake for his own. I was thankful none of the school chaps were
with me. You may be sure I hustled him into a cab pretty quickly."

"Oh, how ridiculous!" I cried, laughing heartily; "but, oh, that poor girl!
What must have been her state of mind when she discovered what
had happened, and found herself in possession of your father's hat?"

"Oh, that did not matter," said Jack. "Girls can wear anything."

Aunt was laughing too, although she had heard the story before.

"Well," she said merrily, "if Professor Faulkner is as absent-minded


as that we shall not lack amusement."

We discussed the unknown Professor pretty thoroughly as we took


our tea. I have often smiled since to think how wide of the mark were
most of our conjectures. Aunt Patty lost no time in replying to his
letter. The result was satisfactory. He wrote again giving excellent
references and asking to be allowed to spend Easter with us. He
would then be able to judge whether the place would suit him for a
longer sojourn.

"A canny Scotsman," was aunt's comment, as she read this. "He is
not going to commit himself to the unknown. Well, I do not blame him
for that."
With considerable excitement and some perturbation, we looked
forward to the stranger's arrival. On the very day we expected him,
we had our second "bite," to use Jack's expressive metaphor.

CHAPTER VI
THE FIRST ARRIVAL

WHEN Thursday came I could see that Aunt Patty looked forward
with some nervousness to the arrival of her guest. Everything was in
readiness. The Professor would be hard to please if he did not like
the pleasant room, to which aunt had added a bookcase and a
writing-table, and contrived to give quite the appearance of a sitting-
room.

"Will he care for any flowers, do you think, Nan?" aunt asked, as we
put the finishing touches to its arrangement.

"Not if he is like the Vicar," I replied.

"He may surely have scholarly habits without being exactly like Mr.
Upsher," aunt said with a smile. "I should put a few if I were you. A
room looks so bare and unhomelike without them."

So I went into the garden and picked half-a-dozen of the lovely


daffodils, which by this time had opened more freely, and put them,
with some of their lance-like leaves, in a tall, slender vase which I
placed on the Professor's writing-table.
I had been in the woods that morning and had brought home some
of the first primroses, smelling so freshly of their mother Earth.
Pleased with the effect of the daffodils, I brought a little bowl which I
had filled with primroses resting amid tiny sprays of ivy, and stood it
on the top of the low bookcase.

"The room does look nice," I said to myself then, "almost too nice for
a dry old professor." I gave the fire a stir and went away to change
my dress, for we did not expect our visitor till close upon dinner-time.
He was coming by the six o'clock train, and Jack had volunteered to
meet him and bring him to "Gay Bowers."

I made my toilet carefully enough to satisfy even Olive. The pretty


evening blouse I wore, with transparent yoke and sleeves, was her
handiwork, and I had the satisfaction of knowing that I looked well in
it. My chestnut-brown hair, which Olive thought pretty, was deftly
coiled, and I observed with some pleasure how well it contrasted
with my black dress, yet I am certain that no idea of pleasing
Professor Faulkner's eye ever crossed my mind. I never imagined
that his mighty intellect could bend to observe the details of a girl's
dress.

When I went downstairs I found Aunt Patty reading a letter, from


which she looked up with an eager, excited countenance.

"The Vicar has been in," she said; "he came from Chelmsford and
brought me this letter. When he was at the post-office on his own
account, he thought he might as well ask if there were any letters for
'Gay Bowers.'"

"You don't mean it!" I exclaimed. "Really I should never have


expected him to be so thoughtful."

"You are too hard on Mr. Upsher, Nan," said Aunt Patty. "I know he is
often dreamy and absent-minded; but when there is a strong
necessity for action, or real trouble anywhere, no one can be more
kind and helpful."
"I am glad to hear it," I said. "But, auntie, the letter? It is surely not
another application?"

"It is," she said, smiling, "and from an American gentleman! His
name is Josiah Dicks, and he wants to know if I can accommodate
him and his daughter, or rather, he calmly announces that they are
coming here on Saturday, hoping to find that I can take them in. If
not, he supposes they can put up at the village inn!"

"The village inn!" I exclaimed with a laugh. "That is hardly the place
to suit a rich American; but, of course, there is a good hotel at
Chelmsford. Is he rich, though?"

"I should imagine so," said my aunt, "since he says that he and his
daughter have been 'all over Europe,' and now want to see a little of
English rural life. It seems too that he is somewhat of an invalid and
country air has been prescribed for him."

"How strange!" I exclaimed. "'Gay Bowers' seems about to be turned


into a convalescent home. But I suppose the daughter is not an
invalid. I shall be glad to have a girl here, if she is nice."

"The ways of American girls do not, I believe, always accord with


English notions of what is becoming," said my aunt; "but I cannot
speak from personal experience."

"Nor can I," was my reply. "I have never known an American girl
intimately. Well, I hope they may prove desirable, for Mr. Josiah
Dicks and his daughter would be a set-off to the Professor."

"You seem to be making rather a bugbear of that Professor, Nan,"


said my aunt.

"Not at all," I replied. "I expect him to be an amiable but rather


melancholy individual with a yellow parchment-like skin and a
chronic liver complaint."
I had hardly said the words when I heard the sound of wheels on the
gravel outside. Aunt went quickly out and met Professor Faulkner in
the hall. The rich deep tones in which he responded to her greeting
came agreeably to my ears. Sweep had sprung forward barking
angrily, as she did at every intruder, but was almost instantly quelled.
I heard the stranger speak to her in tones that seemed to
accompany a caress, and Sweep's bark was changed to a whine of
pleasure. This was wonderful, for since uncle's death Sweep had
shown herself antagonistic to all mankind. I began to feel curious,
and I went forward, meaning to have a word with Jack ere he went
away.

I could have laughed to think how different from my pre-conception


of him was the individual my aunt now introduced to me. I saw a man
rather above the middle height, upright, of energetic bearing, and
looking little more than thirty years of age. His features were strong
and regular; his eyes, of a deep sea-blue, had a very direct and
searching gaze; his complexion was pale, but devoid of any tinge of
yellow. He had fair hair, which he wore rather long. But detailed
description must fail to portray the vivid, powerful personality with
which I then made acquaintance. I thought later that he reminded me
of an old picture of a Viking king which I had seen somewhere. He
looked daring and resolute enough to be a leader of men. A scholar
he certainly was; but no mere book-worm or dreamy idealist.
AUNT MET PROFESSOR FAULKNER IN THE HALL.

His appearance so took me by surprise that I hardly knew what to


say, and blushed and stammered as I tried to welcome him, while his
eyes searched my face as if they could read all that was passing in
my mind. The evening had set in wet, but he did not seem to mind
the rain in the least.

"A little water will not hurt me," he said, as Jack helped him off with
his overcoat, "but I must confess I am rather sensitive to cold. That is
the effect of a residence in India; but I shall soon get over it."

"And you are not afraid of the rigours of country life?" aunt said.

"Oh, no; I was brought up in the country, and I love it!" he answered
heartily.

You might also like