Learn Programming with C: An Easy Step-by-Step Self-Practice Book for Learning C 1st Edition Imran download
Learn Programming with C: An Easy Step-by-Step Self-Practice Book for Learning C 1st Edition Imran download
https://ebookmass.com/product/learn-programming-with-c-an-easy-
step-by-step-self-practice-book-for-learning-c-1st-edition-imran/
https://ebookmass.com/product/microsoft-visual-c-step-by-step-9th-
edition-john-sharp/
https://ebookmass.com/product/microsoft-visual-c-step-by-step-10th-
edition-john-sharp/
https://ebookmass.com/product/easy-algebra-step-by-step-third-edition-
sandra-luna-mccune/
McGraw-Hill's easy English step-by-step for ESL Learners.
Student Book. 2nd Edition Danielle Pelletier
https://ebookmass.com/product/mcgraw-hills-easy-english-step-by-step-
for-esl-learners-student-book-2nd-edition-danielle-pelletier/
https://ebookmass.com/product/python-programming-3-books-
in-1-ultimate-beginners-intermediate-advanced-guide-to-learn-python-
step-by-step/
https://ebookmass.com/product/game-theory-an-introduction-with-step-
by-step-examples-ana-espinola-arredondo/
Authored by two standout professors in the feld of Computer Science and Technology
with extensive experience in instructing, Learn Programming with C: An Easy Step-by Step
Self-Practice Book for Learning C is a comprehensive and accessible guide to programming
with one of the most popular languages.
Meticulously illustrated with fgures and examples, this book is a comprehensive
guide to writing, editing, and executing C programs on diferent operating systems and
platforms, as well as how to embed C programs into other applications and how to create
one’s own library. A variety of questions and exercises are included in each chapter to test
the readers’ knowledge.
Written for the novice C programmer, especially undergraduate and graduate students,
this book’s line-by-line explanation of code and succinct writing style makes it an excellent
companion for classroom teaching, learning, and programming labs.
Sazzad M.S. Imran, Ph.D., is Professor in the Department of Electrical and Electronic
Engineering, University of Dhaka, Bangladesh. He completed his B.Sc. and M.S. degrees in
Applied Physics, Electronics & Communication Engineering from the University of Dhaka
and received his Ph.D. degree from the Optical Communication Lab of the Kanazawa
University, Japan. Dr. Imran has vast experience in teaching C/C++, Assembly Language,
MATLAB®, PSpice, AutoCAD, etc., at the university level (more at sazzadmsi.webnode.
com).
Preface, xi
CHAPTER 1 ◾ Introduction 1
1.1 HISTORY OF PROGRAMMING LANGUAGE 1
1.2 DIFFERENT TYPES OF PROGRAMMING LANGUAGE 2
1.3 IMPORTANCE OF PROGRAMMING 3
1.4 C PROGRAM STRUCTURE 3
1.5 STEP-BY-STEP TUTORIAL TO RUN A C PROGRAM 5
1.6 KEYWORDS 7
1.7 IDENTIFIERS 7
1.8 OPERATORS 8
1.9 OPERATOR PRECEDENCE IN C 9
1.10 VARIABLES 9
1.11 CONSTANTS 10
1.12 ESCAPE SEQUENCES 10
1.13 DATA TYPES 10
1.14 TYPE CASTING 11
1.15 EXAMPLES 12
EXERCISES 26
– MCQ with Answers 26
– Questions with Short Answers 37
– Problems to Practice 44
v
vi ◾ Contents
EXERCISES 294
– MCQ with Answers 294
– Questions with Short Answers 296
– Problems to Practice 299
PROJECT-13 560
PROJECT-14 560
PROJECT-15 560
PROJECT-16 560
PROJECT-17 560
PROJECT-18 561
PROJECT-19 561
PROJECT-20 561
PROJECT-21 561
PROJECT-22 561
INDEX, 563
Visit https://ebookmass.com today to explore
a vast collection of ebooks across various
genres, available in popular formats like
PDF, EPUB, and MOBI, fully compatible with
all devices. Enjoy a seamless reading
experience and effortlessly download high-
quality materials in just a few simple steps.
Plus, don’t miss out on exciting offers that
let you access a wealth of knowledge at the
best prices!
Preface
xi
xii ◾ Preface
In conclusion, this book is a guided self-study for those interested in learning C by fol-
lowing a detailed, tutorial-type problem-solving book. We feel that it is a great book for
teachers to cover as a textbook for C programming language.
Introduction
DOI: 10.1201/9781003302629-1 1
2 ◾ Learn Programming with C
Smalltalk in 1972. Leafy, Logitech, and CrowdStrike were among the companies that used
it. In the same year, Dennis Ritchie created C for use with the Unix operating system at Bell
Telephone Laboratories. C is the basis for several modern languages, including C#, Java,
JavaScript, Perl, PHP, and Python. In 1972, IBM researchers Raymond Boyce and Donald
Chamberlain created SQL, which stood for Structured Query Language. It is a program
that lets you explore and edit data stored in databases.
Afer mathematician Ada Lovelace, Ada was created in 1980–1981 by a team directed
by Jean Ichbiah of CUU Honeywell Bull. Ada is an organized, statically typed, imperative,
wide-spectrum, and object-oriented high-level programming language used for air trafc
control systems. Bjarne Stroustrup created C++ afer modifying the C language at Bell
Labs in 1983. C++ is a high-performance programming language used in Microsof Ofce,
Adobe Photoshop, game engines, and other high-performance sofware. Brad Cox and
Tom Love created the Objective-C programming language in 1983 to construct sofware
for macOS and iOS. Larry Wall designed Perl in 1987 as a general-purpose, high-level pro-
gramming language for text editing.
Haskell, a general-purpose programming language, was created in 1990 to deal with
complex calculations, records, and number crunching. Guido Van Rossum created the
general-purpose, high-level programming language Python in 1991, and it is used by
Google, Yahoo, and Spotify. Visual Basic is a programming language created by Microsof
in 1991 that allows programmers to use a graphical user interface and is used in vari-
ous applications such as Word, Excel, and Access. Yukihiro Matsumoto designed Ruby
in 1993 as an interpreted high-level language for web application development. James
Gosling designed Java in 1995 as a general-purpose, high-level programming language
with cross-platform capabilities. Rasmus Lerdorf created the hypertext preprocessor PHP
in 1995 to create and maintain dynamic web pages and server-side applications. Brendan
Eich wrote JavaScript in 1995 for desktop widgets, dynamic web development, and PDF
documents.
Microsof created C# in 2000 by combining the computing power of C++ with the sim-
plicity of Visual Basic. Almost every Microsof product currently uses C#. In 2003, Martin
Odersky created Scala, which combines functional mathematical and object-oriented pro-
gramming. Scala is a Java-compatible programming language that is useful in Android
development. In 2003, James Strachan and Bob McWhirter created Groovy, a concise and
easy-to-learn language derived from Java. Google created Go in 2009, and it has since
gained popularity among Uber, Twitch, and Dropbox. Apple created Swif in 2014 to
replace C, C++, and Objective-C for desktop, mobile, and cloud applications.
arguments or parameters afer the function name, they are enclosed in parentheses; other-
wise, they are lef empty. Te body of the main() function is comprised of all the statements
between the opening and closing curly braces.
Write C-Program (or any name of your choice) on the ‘Project title:’ and choose the
folder (for example, C:\Users\SazzadImran\Desktop\) where you want to create the
project. Click Next>→Finish. A project or folder is created on the desktop.
6 ◾ Learn Programming with C
Step-3: Double click on C-Program on Workspace to select the project and click
File→New→Empty fle→Yes. Write a fle name of your choice (Example-1, for example)
and click Save.
An empty fle name Example-1.c is created and saved in the C-Program folder.
Step-4: Write your C program codes on the fle Example-1.c and save the fle.
Introduction ◾ 7
Step-5: Click Build→‘Compile current fle’ to compile the program. Correct any error(s)
or warning(s) on the codes. Correcting the errors is a must though it is optional to
correct the warnings. Recompile the program until we get 0 error(s) and 0 warning(s).
Step-6: Click Build→‘Build and run’ to execute the program. Te output screen will look
as follows:
1.6 KEYWORDS
In C programming, 32 reserved words have special meaning to compilers and are utilized
as a part of the syntax. Tese terms cannot be used as names or identifers for variables. Te
list of reserved C keywords is as follows:
auto, break, case, char, const, continue, default, do, int, long, register, return, short,
signed, sizeof, static, struct, switch, typedef, union, unsigned, void, volatile, while, double,
else, enum, extern, foat, for, goto, if.
1.7 IDENTIFIERS
Variables, functions, structures, and other objects in a program are given unique names
called identifers. For example, in the statement of the preceding demo program
int age;
int is a keyword and age is an identifer assigned to a variable by the compiler to iden-
tify the entity uniquely. When naming an identifer, the following guidelines should be
observed.
(1) A valid identifer can include uppercase and lowercase letters, numbers, and
underscores.
(2) Te frst character cannot be a digit.
(3) We cannot use any keyword as an identifer.
(4) Te length of the identifer is unlimited.
Dear Mr. Wilson: You have been pegging away without any
let-up for three months and your work has been excellent.
Here is an easy assignment as a reward of merit. It will
give you a pleasant outing, and us a good page story for
the Sunday sheet. The enclosed clipping from to-day's
paper will give you the idea. The art department will have a
snap-shot camera waiting for you. Our Ship-News man
made arrangements this morning for you to be met and
taken aboard. The one-forty train from Broad Street Station
will take you through to Lewes and the Breakwater. To save
time I enclose some expense money. Try to be back on
Thursday. This will give you three days at sea. We want
plenty of rattling description and human interest, with local
color ad lib. Good luck.
"Oh, there must be some mistake," gasped young Wilson. "A page
Sunday story? A whole page? My work has been excellent? The
managing editor has been following it? Why, I didn't suppose he
knew me by sight. I can't believe it."
Befogged with hopes and fears, he turned back to the door of the
city editor's room.
"He's just gone out to lunch with the managing editor," volunteered
the day assistant. "No, I don't know where they went. Said they'd be
back about two-thirty."
Wilson looked at the office clock. If he would catch the one-forty
train for Lewes there was no leeway for hesitation. He started
toward the elevator, then halted to read the clipping, which might
throw some light upon this staggering manifesto:
Wilson threw his doubts overboard. All he had ever read of bellying
canvas, whipping spars, and lee rails awash leaped into the
foreground of his boyish imagination. Here was his chance for such a
"descriptive story" as he had dreamed of through weeks and
months, this last cruise of the last pilot schooner. He dashed into the
art room, snatched up the waiting camera, and bolted for the
station. After he dropped panting into a seat of the accommodation
train for Lewes, he found himself already overhauling his stock of
sea-lore and sailor adjectives.
There was time for reflection in this four-hour journey to the sea,
and ere long, sober second thought began to overtake his first wild
elation. The young reporter's doubts came trooping back. He
remembered now that he had never written a line of "ship-news" for
the Standard. He blushed to confess to himself that his life on salt
water had been bounded by the decks of river excursion steamers.
And what had he ever done worth the notice of the managing
editor? Of course, he had worked hard, and the world, at least in
fiction, occasionally rewarded honest merit in lowly places with
unexpected largess. But any "star man" of the staff would have
given a week's salary for such a note as this from the chief executive
of the Standard. And he, James Arbuthnot Wilson, was indubitably
the rawest and humblest recruit of that keen and rough-riding
squadron of talent.
An inevitable reaction swung his mood into the forebodings. The
train was loafing along the upper reaches of Delaware Bay when he
re-read the intoxicating note, and caught himself repeating "Dear Mr.
Wilson," with a sudden glimmer of association. In another miserable
moment the youth's beautiful dream was wrenched from him. What
a fool he had been! "Wilson," "Wilson," he muttered and burst out:
"Of course, there is another Wilson, the tip-top man of the staff. It's
the Wilson who's been filling in as chief of the Washington Bureau
for six months. I heard somebody say the other night that 'Doc'
Wilson was coming back, and was to go on general work again. He
must have turned up over Sunday. And that new boy put his note in
my box. Well, I am IT."
Young James Arbuthnot Wilson squeezed back a smarting tear. He
did not try to fence with this surmise. There was no room for doubt
that the kind words and the pleasant outing had been aimed at his
high-salaried elder. James Arbuthnot had never clapped eyes on the
gifted "Doc" Wilson, whose Washington dispatches had carried no
signature and whose distant personality had made no impression
upon this wretched understudy of his.
How could the pilgrim muster courage to go back and face the
issue? He would be the office butt—Well, he could resign, but most
likely, he reflected, dismissal would be the instant penalty of this
incredibly presumptuous blunder. The only thing to be done was to
drop off at the next way station and return to the scene of his
downfall. But to his stammering plea the brakeman returned:
"Next train up won't get along here till late to-night. You better go
through to Lewes instead of waiting seven hours at one of these
next-to-nothing flag stations."
The reporter slumped into his seat and looked through the open
window. The tang of brine was in the breeze that gushed up the bay
with the rising tide. Across the green fields he began to glimpse
flashing blue water and bits of the traffic of far-off seas. A deep-
laden tramp freighter was creeping toward her port, a battered bark
surged solemnly in tow of an ocean-going tug, and a four-masted
schooner was reaching up the bay with every sail pulling. Across the
aisle of the car Wilson noticed, with a melancholy pleasure, four
deep-tanned men of rugged aspect, who played cards with much
talk of ships and tides and skippers. They belonged in this picture.
Wilson thought of the stewing city far behind him, and the spirit of
some sea-faring ancestor was whispering in his ear. Yes, by Jove! he
would see the tragic venture through after all. It were better to
return with a "story," and fall with colors flying than to slink back to
empty ridicule. Let them try to overtake him if they dared. This was
"Mr. Wilson's" mission, and no one could snatch it from him.
When the train labored into Lewes, the fugitive looked across the
flats to the cuddling arm of the Breakwater and the shining sea
beyond. With the instinct of the hunted, he made ready to flee in
this direction, away from the station and the town. As he dropped
from the car, a man in the uniform of a station agent climbed aboard
and shouted:
"Telegram for Mr. Wilson. Is Mr. Wilson aboard? Urgent telegram for
Mr. J. A. Wilson."
Mr. Wilson's pulse fluttered as he dove behind the warehouse across
the tracks, while the hoarse cry of the station agent rang horribly in
his ears. The long arm of the Standard had almost clutched him by
the collar. As he hurried down the nearest street to the water, he
saw heading toward him a lusty youth of a sailorish cut, who eyed
the camera case as if hasty suspicions were confirmed.
"Is your name Wilson?" demanded the stranger. "If it be, come along
with me. I'm from the Albatross' boat-crew."
Wondering how much guilt was written in his face, Wilson fervently
shook the hand of the briny youth. They fared toward the pier, while
the convoy explained:
"You're in luck. We're ready to go to sea as soon as you get aboard.
Hit it just right, didn't you? The pilots'll be glad to see you again.
They was tickled to death over the piece you wrote for the paper
when the Eben Tunnell, Number Three, come in after fightin'
through the '88 blizzard, and specially what you wrote about ol' 'Pop'
Markle stickin' by the Morgan Castle when she ketched fire off the
Capes two year ago. And, say, they still talk about that jack-pot you
sky-hooted clean through the cabin skylight, and how th' Pilots'
Association went in mournin' for thirty days after that poker game.
Two o' them boys is aboard this cruise, with the chips all stacked an'
waitin', and their knives whetted. I'm sorry I missed the fun before."
James Arbuthnot Wilson gulped hard at these lamentable tidings. He
was vaulting from the frying-pan into the fire. These rude and
reckless men would probably heave him overboard. And, alas, the
penny-ante of his mild college dissipations had left him as deficient
in poker prowess as in sea-lore. The foremast hand from the
Albatross was somewhat crestfallen over his capture. If this slip of a
boy was the seasoned and capable "Doc" Wilson, able to hold his
own in all weather and any company, then appearances were basely
deceiving, and the escort felt a sense of personal grievance.
The boat was waiting at the pier and the four slouching seamen
rowed out to the black schooner, which lazily rolled her gleaming
sides off the end of the Breakwater. Wilson climbed awkwardly
aboard and was saved from sprawling his length on deck by a strong
hand, which yanked him in a welcoming grip. Then a stocky man
with a grizzled mustache stepped back and fairly shouted:
"Why, hell! You ain't 'Doc' Wilson. What kind of a game is this? I
popped up from below in time to see your hat coming over the side.
Kick me, please. I'm dreamin', as sure as my name's McCall."
He fished a rumpled telegram from his blue clothes, and flourished it
before the nose of his guest, as he cried formidably:
"Read that!"
Young Wilson looked at the half mile of water between the schooner
and the beach, and thought of trying to swim for it. But the bully-
ragging tone of the pilot struck a spark of his latent pluck and he
answered with some spirit:
"I'm mighty sorry you're so disappointed. My name is Wilson, James
Arbuthnot Wilson, of the Standard. The order to join your boat was
delivered to me. If there's been a mistake, and I'm so unwelcome,
I'll have to put you to the trouble of setting me ashore again."
The innate hospitality of his kind smothered the pilot's first
emotions, and he regretted his rudeness as he smote the lad on the
back and shouted:
"All right, Jimmy Arbutus. I guess there's no great damage done. It's
now or never for your newspaper, and if we can't carry the skipper,
we'll get along with the mate of your outfit. And we'll give you a
cruise to make your lead-pencil smoke. Tumble below and shake
them natty clothes. The boat-keeper will fit you out with a pair of
boots and a jumper."
Sore and abashed, with the hateful emotions of an intruder, Wilson
crept below and faced another ordeal. In the pilots' roomy cabin,
which ran half the length of the schooner, four men were changing
their clothes and tidying up their bunks. One of them emerged from
the confusion to yell at the invader's patent leather ties:
"Hello, Doc, you old pirate. Is that you? Glad to see you aboard.
Well, I will be damned!"
His jaw dropped and he looked sheepish as a hurricane voice came
through the open skylight:
"Don't hurt the kid's feelin's. I've done plenty of that. This is Jimmy
Arbutus Wilson, apprentice to 'Doc,' and he's doin' the best he can.
'Doc' got stranded somewheres, and the lad is takin' his run. I don't
fathom it a little bit, but what's the odds?"
The passenger was introduced to all hands, who showed a
depressing lack of enthusiasm, and the pilots returned to their tasks.
Wilson retired, blushing and confused, to the edge of his bunk.
Presently the oldest man of the party sat down beside the intruder,
and shook his hand for the second time. Wilson raised his downcast
face to the white-haired veteran, who said softly:
"Now, sonny, don't let the boys rile you none. They're kinder sore on
some of the greenhorns that writes pieces all wrong for the
Philadelphy papers, and this 'Doc' Wilson knows sailor ways and
sailor lingo, and they sorter took a shine to him and his style. But
fur's I know, you can write rings around him. And Old Pop Markle, as
they calls me, will see you through, blow high, blow low. It's my last
cruise, this is. I'm past seventy year, sonny, and my oldest boy is a
pilot; he brought a tanker in yestiddy, and my grandson is servin' his
apprentice years, and he'll be gettin' his papers pretty soon. It's time
for me to quit. I was goin' to lay up ashore in the spring, but I
kinder wanted to wind up with the old Albatross. Better come on
deck, sonny; we're shortenin' cable."
Wilson smiled his gratitude at the gentle and garrulous old pilot,
whose smooth-shaven face was webbed with fine-drawn wrinkles, as
if each salty cruise had left its own recording line. The blue eyes
were faded from staring into fifty years of sun and wind, but they
held a beaming interest in the welfare of this tyro struggling in the
meshes of hostile circumstance.
The reporter followed his guardian on deck, and his spirits swiftly
rose. The Albatross was paying off under a flattened forestaysail,
while her crew tailed onto the main-sheet with a roaring chorus, for
they, too, felt a thrill of sentiment in this last cruise. The wind held
fresh from the south'ard, and under the smooth lee of Cape
Henlopen the Albatross shot seaward, as if they were skating over a
polished floor. Now the pilots came tumbling up, and shouted as
they turned to and helped set the maintopsail and staysail. The
schooner staggered down to it, until the white water hissed over her
low bulwark, and sobbed through the scuppers. "Old Pop" Markle
slapped his knee and cried huskily:
"Give her all she'll stand, boys. It's like old times when we raced that
dodgasted Number Four and hung to the weather riggin' by our
teeth, and bent a new suit of sails every other cruise."
Holding the wind abeam, the Albatross drove straight out to sea, and
then, once clear of Cape May, slid off to the north'ard. Now, the
quartering sea picked her up and she swooped down the slopes and
tried nimbly to climb the frothing hills, as the jolly wind smote her
press of canvas and jammed her smoking through them. A new
exhilaration surged in young Wilson's veins. He was drinking it all in,
the buoyant flight of the low, slim schooner, the intimate nearness of
the sea, the sweetness of the wind, and the solemnity of the
marching twilight. He would not have been elsewhere for worlds.
Then the fat and sweating face of the cook appeared from below,
and bellowed an inarticulate summons.
The pilots obeyed with ardor, and Wilson followed timidly in their
wake. Supper smoked on the cabin table, and the guest was glad to
survey the stout fare of hash, cold meat, potatoes, green peas, flaky
hot biscuits, and a mammoth pudding. "Old Pop" Markle took the
youngster under his protecting wing, and found a seat on the locker
beside his own. The reporter fell to, while the pilots chatted with
bursts of gusty laughter. He made one desperate rally to join the
talk, and in a quiet moment asked a neighbor:
"How do you know when a ship wants a pilot?"
"We generally have a trained green parrot that flies over and asks
'em," was the cruel response. "But we ran short of stores last cruise,
and had to eat him. This voyage we intend to mail 'em postal cards."
There was an appreciative roar, and Wilson winced as "Old Pop"
Markle whispered:
"Don't mind that Peter Haines. He's got a heart as soft as mush. It's
only their skylarkin', sonny. Hit 'em back. That's what they like."
But the victim had lost all self-confidence, and now he was
beginning to feel dizzy and forlorn. The smell of food, the heat, and
the jerky plunging of the cabin were overwhelming. He staggered to
his bunk and crept in. This was the last blow, that on top of his false
pretences he should be laid low before the eyes of this hostile
crowd. He knew not what happened, until hours after he awoke
from a semi-stupor to find "Old Pop" Markle sponging his face with
cold water and calling in his ear:
"There's a steamer coming up from the east'ard. Brace up and get
on deck. It's a pretty sight."
The boy clambered through the companionway as the boat-keeper
touched a match to an oil-soaked bunch of waste in a wire cage at
the end of his torch. The schooner and the near-by sea were bathed
in a yellow glare. Out in the darkness a blue Coston light glowed a
response. Some one shouted: "On deck for the skiff," and five
minutes later the boat-crew was pulling off in the night to the
waiting steamer, with a pilot in the stern-sheets.
"There goes your friend, Peter Haines," chuckled "Pop" Markle. "I
knowed you'd take it hard if I didn't give you a chance to say good-
bye to him. He won't pester you no more this cruise."
The wind blew some of the cobwebs from poor Wilson's muddled
head, and he felt refreshed. Soon the pelting spray drove him below
deck and he curled up on a locker, watching the poker game from
which youth and inexperience barred him. And what was more
cutting, he was not even asked to play.
"It would be like taking pennies from a blind child," callously
commented the strapping McCall who had welcomed him aboard.
But the white-haired patriarch of them all did not join the game, and
he said cheerily to Wilson:
"You're too young and I'm too old to be wastin' our wages in them
pursuits, ain't we, sonny? There's an old lady and a cottage at Lewes
that takes care of my rake-off. And instid of raisin' the limit, I raise
vegetubbles for my fun."
Wilson opened his bruised heart and told the old pilot the story of
his venture, and felt relieved that his masquerade had been thrown
away. "Pop" Markle's blue eyes twinkled:
"See here, Jimmy Arbutus, I'll see that you write a fust-rate piece for
your paper. Ask me anything your amazin' ignorance tells you to.
The boys wanted me to take in the fust vessel we met, and was
willin' to shove their turns aside, but I told 'em it was my last cruise,
and I was goin' to see her through to the finish. So we've lots of
time to talk pilotin' together. What was the most remarkable
experience ever I had? Pshaw, that sounds like a full-rigged reporter,
sonny, really it does.
"Well, I never got drownded boardin' a vessel, but I once fell afoul of
a skipper that was a worse blunderin' idjit than you've been. It may
sound kinder comfortin' to you. About fifty miles off the Capes, I
clumb aboard an Italian bark. Her captain said he was bound for
Wilmington, and would I take him in? He got a tow-boat at the
Breakwater, and we were goin' up the river all right, when plumb by
accident this benighted Dago imparted to me that he was bound for
Wilmington, North Caroliny. 'Great Scott! You dodgasted lunatic,'
says I, 'you're pretty nigh up to Wilmington, Delaware.' He went
crazier than ever, and put about for sea after I showed him on the
chart where he was at. He had been runnin' by dead-reckonin', and
didn't know where he was. So, when he picked up a pilot and found
he was headed all right for Wilmington, he figured his troubles were
over. So there's worse than you afloat, Jimmy Arbutus."
At his suggestion, Wilson dug up his notebook and scribbled therein
many other yarns, for the old pilot warmed to his task, and insisted
that each of the poker players should contribute a story to the fund.
When he was routed out for breakfast, the party had lost another
pilot who had found his ship at daybreak. The wind had drawn into
the northeast, and the Albatross was snuggled down under double
reefs. The barometer was falling, and the boat-keeper shook his
head when the pilots insisted upon edging further off shore.
"Drive her till she cracks," shouted McCall. "This is the trip when we
keep going till we get our ships. The Albatross goes home empty,
you bet your boots."
With much daring and difficulty one man was put aboard a liner late
in the afternoon. Three pilots were left, and they swept Wilson into
their genial comradeship, as the little party clawed its way to supper,
and hung onto the table by its eyelids. In his mind, Wilson began to
see the page story, "full of human interest and color." To-morrow he
would work at his "introduction," and the thought of really making a
start at filling those stately columns was perturbing. He felt
something like stage-fright at the notion of it.
Before midnight, James Arbuthnot Wilson had forgotten his "story,"
and was thinking only of the awful turmoil above him. The wind had
leaped to the might of a sudden summer gale. The schooner was
hove to and battened tight, and like a tightly corked bottle she
danced over the shouting seas. Made sick and giddy, Wilson sought
"Old Pop" Markle, who was peacefully snoring in the next bunk, and
shook him awake.
"Pshaw, sonny," the old man muttered, "she's safer than a big ship.
She'll rare and tear and sputter till it blows over. If it'll ease your
mind any, I'll take a peek on deck."
The pilot slipped into his oil-skins and vanished.
"It's pretty thick," he said when he came below, "but there ain't no
great sea on, not for us. Rainin' hard and blowin' some. McCall is
standin' watch with the boat-keeper. You're safer than if you was in
the Standard office. You can't lose your job out here, Jimmy."
Somewhat comforted, Wilson tried to sleep. It was a terrifying
experience for the greenhorn, with more "local color" than he had
bargained for. Some time later in the night he was half dreaming
that "Doc" Wilson was holding his head under water and drowning
him with the most enjoyable deliberation.
With a crashing sound like the explosion of a great gun in his ears,
he was flung headlong clear across the cabin, and on top of him
came "Old Pop" Markle, sputtering harmless curses. The cabin floor
sloped like the side of a house and stayed there as Wilson scrambled
to his hands and knees. Then came a more sickening lurch, and
before the hanging cabin lamp was smashed against the deck-
beams, the lad saw that the old man was dazed. He gave him a
hand, and together they climbed the slope, and grasped the legs of
the stationary table. They heard the other pilots stumble up the
companion ladder, and hammer back the hatch, with yells of terror
lest they be trapped.
Forward of the cabin bulkhead, they heard the roar of inrushing
water, and smothered outcries among the watch below. While the
old man and the boy tried to grope their way aft to the ladder, the
sea crashed through the bulkhead door from the galley beyond, and
instantly they were picked up and hurled aft, choking and fighting
for life. Wilson chanced to grasp a step of the ladder, and with his
free arm pulled "Old Pop" Markle to this refuge. The reporter did not
want to die, and he knew that death dragged him by the heels. And
it was with no heroic prompting that he pushed the old man up
ahead of him. It was done on the instant, as one friend would help
another in a pinch, without wrought-out purpose.
The water was sucking at his waist as he fought his way up, and
partly out, and managed to double himself over the hatch coaming,
with the old man's legs across his shoulders. Thus they were half
jammed in the cramped exit. Just then the flare torch was lighted by
a seaman. In the yellow glare "Old Pop" Markle saw the two pilots
and two, only two, of the crew wrestling with the one skiff left at the
davits. One of them stopped to beckon wildly to the old man and
started to go to his aid.
In this moment the schooner lurched under with a weary, lifeless
roll, and a black sea stamped across her sodden hull. It licked up the
boat and the handful of toiling men, it leaped forward and pulled
down the black figure with the torch. The two men still jammed in
the hatchway were cruelly battered, but they could not be wrenched
away. And when the towering comber had passed, there was
darkness and silence, and no more shouting voices on the
schooner's deck.
The old pilot wriggled free and got his hands on a life-buoy that
hung within his reach at the after end of the cabin hatch. Wilson
dragged himself after him, and pitched against a splintered mass of
planking upended against the wheel. They listened and heard a
steamer's imploring whistle, and one faint cry off to leeward. "Pop"
Markle groaned as he fumbled in the darkness and laboriously
passed a tangle of line around the wreck of the skylight cover to
which Wilson was clinging.
"Hang on, sonny," he gasped. "I've made the buoy fast to the loose
timber. We'll go off together with the next sea, sure. My God! here it
comes."
The dying schooner seemed to sink from beneath them, and clinging
to their frail bit of a raft, they were spun off to leeward in the arms
of the sea that swamped the rock-ballasted Albatross. Turned over
and over, the two men fought for breath until the skylight cover
righted, and they came to the surface. They slid swiftly into a murky
hollow, and were borne to the tattered crest whose froth was
strangling.
But the wind was falling fast. Such seas as those which had broken
over the helpless Albatross were running in swollen billows when
they met no barrier to check them. Therefore the castaways could
cling and breathe, and even made shift to pass the loose ends of the
line around their waists while they waited for the end. Now their
spray-blinded eyes dimly saw the lights of the steamer that had
bitten halfway through the pilot-schooner. She was blundering far to
windward, and her signal rockets cut red gashes in the night. They
could watch her swing in a useless circle as she sought to find the
craft she had struck. Drifting away to leeward, the old pilot and the
young reporter tried to shout, but their little rasping cries were
pitifully futile. They coughed the racking brine from their throats,
and saw the last rocket soar, saw the steamer's lights fade in the
rain, become twinkling points and vanish.
The last of the "Albatross."
There were no words between them until the day began to break.
Now and then one sought the other's hand and found a feebly
responsive grip. Thus they knew that death had not come to the
little raft. With the gray light, the wind veered round to the
south'ard, and except for the swinging swell, the sea was smoothed
to summer gentleness. The eternal miracle of dawn had never come
to more grateful hearts than these two. Youth had survived the
battering ordeal with mind still alert, but old age was near passing
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.
ebookmasss.com