100% found this document useful (17 votes)
102 views

Free Access to Test Bank for C++ Programming: From Problem Analysis to Program Design, 6th Edition – D.S. Malik Chapter Answers

Bank

Uploaded by

jexaelmiguee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (17 votes)
102 views

Free Access to Test Bank for C++ Programming: From Problem Analysis to Program Design, 6th Edition – D.S. Malik Chapter Answers

Bank

Uploaded by

jexaelmiguee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

Visit https://testbankbell.

com to download the full version and


explore more testbank or solution manual

Test Bank for C++ Programming: From Problem


Analysis to Program Design, 6th Edition – D.S.
Malik

_____ Click the link below to download _____


http://testbankbell.com/product/test-bank-for-c-
programming-from-problem-analysis-to-program-
design-6th-edition-d-s-malik/

Explore and download more testbank at testbankbell.com


Here are some suggested products you might be interested in.
Click the link to download

Solution manual for C++ Programming: From Problem Analysis


to Program Design, 6th Edition – D.S. Malik

http://testbankbell.com/product/solution-manual-for-c-programming-
from-problem-analysis-to-program-design-6th-edition-d-s-malik/

C++ Programming From Problem Analysis to Program Design


8th Edition Malik Solutions Manual

http://testbankbell.com/product/c-programming-from-problem-analysis-
to-program-design-8th-edition-malik-solutions-manual/

Solution Manual for C++ Programming: Program Design


Including Data Structures, 6th Edition D.S. Malik

http://testbankbell.com/product/solution-manual-for-c-programming-
program-design-including-data-structures-6th-edition-d-s-malik/

Test Bank for Leadership Theory and Practice, 8th Edition,


Peter G. Northouse

http://testbankbell.com/product/test-bank-for-leadership-theory-and-
practice-8th-edition-peter-g-northouse/
Test Bank for Personal Nutrition, 9th Edition

http://testbankbell.com/product/test-bank-for-personal-nutrition-9th-
edition/

Solution Manual for Marketing Research, 13th Edition, V.


Kumar, Robert P. Leone, David A. Aaker, George S. Day

http://testbankbell.com/product/solution-manual-for-marketing-
research-13th-edition-v-kumar-robert-p-leone-david-a-aaker-george-s-
day/

Test Bank for Methods: Doing Social Research, 4/E 4th


Edition Winston Jackson, Norine Verberg

http://testbankbell.com/product/test-bank-for-methods-doing-social-
research-4-e-4th-edition-winston-jackson-norine-verberg/

Solution Manual Managerial Accounting: Creating Value in a


Dynamic Business Environment, 9/e Ronald W. Hilton

http://testbankbell.com/product/solution-manual-managerial-accounting-
creating-value-in-a-dynamic-business-environment-9-e-ronald-w-hilton/

Exploring Biological Anthropology The Essentials 3rd


Edition Stanford Allen Anton Test Bank

http://testbankbell.com/product/exploring-biological-anthropology-the-
essentials-3rd-edition-stanford-allen-anton-test-bank/
Test Bank for Lutz’s Nutrition and Diet Therapy 7th by
Mazur

http://testbankbell.com/product/test-bank-for-lutzs-nutrition-and-
diet-therapy-7th-by-mazur/
Test Bank for C++ Programming: From Problem Analysis to
Program Design, 6th Edition – D.S. Malik
Download full chapter at: https://testbankbell.com/product/test-bank-for-c-
programming-from-problem-analysis-to-program-design-6th-edition-d-s-malik/

Chapter 2: Basic Elements of C++

TRUE/FALSE

1. In C++, reserved words are the same as predefined identifiers.

ANS: F PTS: 1 REF: 36

2. The maximum number of significant digits in values of the double type is 15.

ANS: T PTS: 1 REF: 42

3. The maximum number of significant digits in float values is up to 6 or 7.

ANS: T PTS: 1 REF: 42

4. An operator that has only one operand is called a unique operator.

ANS: F PTS: 1 REF: 45

5. If a C++ arithmetic expression has no parentheses, operators are evaluated from left to right.

ANS: T PTS: 1 REF: 46

6. A mixed arithmetic expression contains all operands of the same type.

ANS: F PTS: 1 REF: 49

7. Suppose a = 5. After the execution of the statement ++a; the value of a is 6.

ANS: T PTS: 1 REF: 70

8. The escape sequence \r moves the insertion point to the beginning of the next line.

ANS: F PTS: 1 REF: 78

9. A comma is also called a statement terminator.

ANS: F PTS: 1 REF: 90

10. Suppose that sum is an int variable. The statement sum += 7; is equivalent to the statement
sum = sum + 7;

ANS: T PTS: 1 REF: 95


MULTIPLE CHOICE

1. The ____ rules of a programming language tell you which statements are legal, or accepted by the
programming language.
a. semantic c. syntax
b. logical d. grammatical
ANS: C PTS: 1 REF: 34

2. Which of the following is a reserved word in C++?


a. char c. CHAR
b. Char d. character
ANS: A PTS: 1 REF: 36

3. Which of the following is a legal identifier?


a. program! c. 1program
b. program_1 d. program 1
ANS: B PTS: 1 REF: 36

4. ____ is a valid int value.


a. 46,259 c. 462.59
b. 46259 d. -32.00
ANS: B PTS: 1 REF: 39-40

5. ____ is a valid char value.


a. -129 c. 128
b. ‘A’ d. 129
ANS: B PTS: 1 REF: 40

6. An example of a floating point data type is ____.


a. int c. double
b. char d. short
ANS: C PTS: 1 REF: 41

7. The memory allocated for a float value is ____ bytes.


a. two c. eight
b. four d. sixteen
ANS: B PTS: 1 REF: 42

8. The value of the expression 33/10, assuming both values are integral data types, is ____.
a. 0.3 c. 3.0
b. 3 d. 3.3
ANS: B PTS: 1 REF: 43-44

9. The value of the expression 17 % 7 is ____.


a. 1 c. 3
b. 2 d. 4
ANS: C PTS: 1 REF: 43-44

10. The expression static_cast<int>(9.9) evaluates to ____.


a. 9 c. 9.9
b. 10 d. 9.0
ANS: A PTS: 1 REF: 51

11. The expression static_cast<int>(6.9) + static_cast<int>(7.9) evaluates to ____.


a. 13 c. 14.8
b. 14 d. 15
ANS: A PTS: 1 REF: 51

12. The length of the string "computer science" is ____.


a. 14 c. 16
b. 15 d. 18
ANS: C PTS: 1 REF: 54

13. In a C++ program, one and two are double variables and input values are 10.5 and 30.6.
After the statement cin >> one >> two; executes, ____.
a. one = 10.5, two = 10.5 c. one = 30.6, two = 30.6
b. one = 10.5, two = 30.6 d. one = 11, two = 31
ANS: B PTS: 1 REF: 64

14. Suppose that count is an int variable and count = 1. After the statement count++;
executes, the value of count is ____.
a. 1 c. 3
b. 2 d. 4
ANS: B PTS: 1 REF: 70

15. Suppose that alpha and beta are int variables. The statement alpha = --beta; is equivalent
to the statement(s) ____.
a. alpha = 1 - beta;
b. alpha = beta - 1;
c. beta = beta - 1;
alpha = beta;
d. alpha = beta;
beta = beta - 1;
ANS: C PTS: 1 REF: 70-71

16. Suppose that alpha and beta are int variables. The statement alpha = beta--; is equivalent
to the statement(s) ____.
a. alpha = 1 - beta;
b. alpha = beta - 1;
c. beta = beta - 1;
alpha = beta;
d. alpha = beta;
beta = beta - 1;
ANS: D PTS: 1 REF: 70-71
17. Suppose that alpha and beta are int variables. The statement alpha = beta++; is equivalent
to the statement(s) ____.
a. alpha = 1 + beta;
b. alpha = alpha + beta;
c. alpha = beta;
beta = beta + 1;
d. beta = beta + 1;
alpha = beta;
ANS: C PTS: 1 REF: 70-71

18. Suppose that alpha and beta are int variables. The statement alpha = ++beta; is equivalent
to the statement(s) ____.
a. beta = beta + 1;
alpha = beta;
b. alpha = beta;
beta = beta + 1;
c. alpha = alpha + beta;
d. alpha = beta + 1;
ANS: A PTS: 1 REF: 70-71

19. Choose the output of the following C++ statement:


cout << "Sunny " << '\n' << "Day " << endl;
a. Sunny \nDay
b. Sunny \nDay endl
c. Sunny
Day
d. Sunny \n
Day
ANS: C PTS: 1 REF: 73

20. Which of the following is the newline character?


a. \r c. \l
b. \n d. \b
ANS: B PTS: 1 REF: 73

21. Consider the following code.

// Insertion Point 1

using namespace std;


const float PI = 3.14;

int main()
{
//Insertion Point 2

float r = 2.0;
float area;
area = PI * r * r;

cout << "Area = " << area <<endl;


return 0;
}
// Insertion Point 3

In this code, where does the include statement belong?


a. Insertion Point 1 c. Insertion Point 3
b. Insertion Point 2 d. Anywhere in the program
ANS: A PTS: 1 REF: 80

22. ____ are executable statements that inform the user what to do.
a. Variables c. Named constants
b. Prompt lines d. Expressions
ANS: B PTS: 1 REF: 91

23. The declaration int a, b, c; is equivalent to which of the following?


a. inta , b, c; c. int abc;
b. int a,b,c; d. int a b c;
ANS: B PTS: 1 REF: 92

24. Suppose that alpha and beta are int variables and alpha = 5 and beta = 10. After
the statement alpha *= beta; executes, ____.
a. alpha = 5 c. alpha = 50
b. alpha = 10 d. alpha = 50.0
ANS: C PTS: 1 REF: 94

25. Suppose that sum and num are int variables and sum = 5 and num = 10. After the
statement sum += num executes, ____.
a. sum = 0 c. sum = 10
b. sum = 5 d. sum = 15
ANS: D PTS: 1 REF: 95

COMPLETION

1. ____________________ is the process of planning and creating a program.

ANS:
Programming
programming

PTS: 1 REF: 28

2. A(n) ____________________ is a memory location whose contents can be changed.

ANS: variable

PTS: 1 REF: 33

3. A(n) ____________________ is a collection of statements, and when it is activated, or executed, it


accomplishes something.
ANS:
subprogram
sub program
sub-program
function
modlue

PTS: 1 REF: 34

4. ____________________ functions are those that have already been written and are provided as part of
the system.

ANS:
Predefined
predefined
Standard
standard

PTS: 1 REF: 34

5. ____________________ rules determine the meaning of instructions.

ANS:
Semantic
semantic

PTS: 1 REF: 34

6. ____________________ can be used to identify the authors of the program, give the date when the
program is written or modified, give a brief explanation of the program, and explain the meaning of
key statements in a program.

ANS:
Comments
comments

PTS: 1 REF: 34

7. The smallest individual unit of a program written in any language is called a(n)
____________________.

ANS: token

PTS: 1 REF: 35

8. In a C++ program, ____________________ are used to separate special symbols, reserved words, and
identifiers.

ANS:
whitespaces
whitespace
white spaces
white space
PTS: 1 REF: 37

9. The ____________________ type is C++ ’s method for allowing programmers to create their own
simple data types.

ANS: enumeration

PTS: 1 REF: 38

10. The memory space for a(n) ____________________ data value is 64 bytes.

ANS: long long

PTS: 1 REF: 39

11. The maximum number of significant digits is called the ____________________.

ANS: precision

PTS: 1 REF: 42

12. When a value of one data type is automatically changed to another data type, a(n)
____________________ type coercion is said to have occurred.

ANS: implicit

PTS: 1 REF: 51

13. A(n) ____________________ is a sequence of zero or more characters.

ANS: string

PTS: 1 REF: 53

14. In C++, you can use a(n) ____________________ to instruct a program to mark those memory
locations in which data is fixed throughout program execution.

ANS:
named constant
constant

PTS: 1 REF: 55

15. A data type is called ____________________ if the variable or named constant of that type can store
only one value at a time.

ANS: simple

PTS: 1 REF: 57
Other documents randomly have
different content
The Project Gutenberg eBook of Blue and Purple
This ebook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this ebook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.

Title: Blue and Purple

Author: Francis Neilson

Release date: July 15, 2021 [eBook #65842]

Language: English

Credits: Charlene Taylor, Chuck Greif and the Online Distributed


Proofreading Team at https://www.pgdp.net (This file
was produced from images generously made available
by The Internet Archive/American Libraries.)

*** START OF THE PROJECT GUTENBERG EBOOK BLUE AND


PURPLE ***
CONTENTS
BLUE AND PURPLE
SONGS TO A WIFE
BLUE AND PURPLE
FAR HORIZONS
HEBE’S EYES
SWEET FACE, I SEE THEE SHINE
TWO FLOWERS
THE MUSIC OF MY HEART
THE TRYST
NATURE’S LOVELINESS
YOU
THE LAST LIGHT
WHEN YOU WERE BORN
FORTUNE, YOU HAVE NAUGHT I NEED
LET US MAKE A GARDEN
SANCTUARY
STARS
REJUVENATION
A SONG
HEBE
SPRING
THE FAY
A SONG
THE GARDENER
REVELATION
THE KEEPER OF THE KISSES
MUSIC IN HADES
THE DREAM
THE BOON
JACK O’LANTERN
OH, TRANQUIL NIGHT
DESPAIR
TO A PHOTOGRAPH
SONG
HELL
ALONE
ROAMING
STORM
THE VOID
ABSENCE
WANDERING
DESTINY
EAST WIND
LULLABY
RESURRECTION
LAUGHTER
ALCHEMY
SURRENDER
WHAT IS DAY WITHOUT THE SUN?
THE MORN
THE GARDEN MADE FOR ME
TO A REPEATER
THE MUSIC OF A DREAM
A FLOWER
WHAT WOULD YOU DO?
HER SOUL’S SWEET HEART
I LOVE YOU SO!
LOVE’S LAST QUEST
CONSECRATION

BLUE AND PURPLE


FRANCIS NEILSON

NEW YORK: B. W. HUEBSCH


MCMXX

COPYRIGHT, 1920, BY

B. W. HUEBSCH
SONGS TO A WIFE
My love is beautiful and sweet; she is like a pale pink
rose full of the glory of dew and sun. Sharon’s garden
knows not a bloom so fair as she. Persia holds not a
fragrance so heavenly in its perfumed bowers. Oh, my
wondrous love, pour thy scented charm into the chalice of
my longing heart; fill with thy fresh splendour the air I
breathe; and give me youth to spend on thee, my well-
beloved. I am the gardener, born to tend one flower. My
flower is the radiance of a dawn in June. Like a veil of
glowing pearls my love spreads her light; she is my
morning, my joy of perfect hours. I will sing to her the
song fresh roses raise from their delicious petals when
night departs and they rejoice, sun-kissed, when all the
east is rich in gold. Lovely is my bloom. Her soul is the
first blossom given by Him who made the loveliness of
Spring.
BLUE AND PURPLE

IN BLUE AND PURPLE CLAD

A pearl set in the hollow of a stone,


Wrought deftly by an artist of great skill;
A sapphire ’twas that bore the pearl so still
Within its bosom; taking from its tone

Those fires of deep delight to Asia known.


Blent in an amethyst, the priceless twain
Enthronèd were, o’er glowing worlds to reign,
In gladness richer than the morn has shown.

She, like a regal lily of the field,


On which the sunset colours softly lay,
Forgot that life was sometime dark and sad;
She smiled, and bade all sorrow’s wounds be healed;
Then she was lovelier than heav’n’s best day—
Ethereal, in blue and purple clad.
FAR HORIZONS
We stand upon the barren shore,
And look far out to sea,
The crooning waves their burden pour
On you and me.

Our longing eyes, full of our mind,


On far horizons lie—
There, where our joy we hope to find
Before we die.

How fair the tempting journey seems—


Smooth lake of mystery—
How frail the craft, our forethought deems,
For such a sea!

For you and me, my lovely one,


And all our mighty hopes;
One step, dear love, and we have done,
And—cut the ropes?

Lashed to the past we stand, and fear


To leave our ties and pain;
Though (speaks the soul, if we would hear)
Our loss is gain.

Fear blurs the vision of our dream,


Fear fills our hearts with dread,
Soon we shall find upon life’s stream
Our souls are dead.

We stand upon the shore and mourn;


We grieve, despairingly,
To leave the fetters we have borne—
So patiently.

Or, do we grieve that we are weak,


Lack courage to be free,
And spurn the liberty we seek
For slavery?

Doubts lie—like pebbles on this strand—


In our sad souls, my mate.
Before us lies the promised land,
Behind us—fate.

Then, let us here together bide,


With faces toward the sea,
And hope that some fair morning’s tide
Take you and me.
HEBE’S EYES

The light of Hebe’s eyes


Gives colour to the skies,
It makes the azure dome
A radiant place,
Where love might find a home,
Sweet as her face.

Ethereal are the hues


Where birds a-wing would lose
Themselves in heavenly bliss;
As I would do—
If I might soar to kiss
Her eyes so blue!
SWEET FACE, I SEE THEE SHINE

Sweet face, I see thee shine


Out of the bosom of the east at morn;
Thy tenderness, divine,
Lies mirrored in the pearly dew at dawn.

The flower that smiles at me,


Holds in its cup the picture of your face;
In rivulets I see
The flowing charm of your abiding grace.

The sapling tells me how


Your body’s symmetry grows strong and straight;
The winds which whisper now,
Tell me your love and trust will not abate.

The steadfast stars above


Reflect the fervour of your constant mind,
Your deep unwav’ring love—
The rarest jewel eager man can find!

In nature’s soul thou art—


I see thee, hear thee, feel thee, ever near;
Dear love, thou art the heart
Of those eternal joys our souls revere.
TWO FLOWERS

I saw a bloom,
So beautiful,
My sad heart lost its gloom,
And cares that dull
The senses, soon passed far away—
The bloom brought joy into the day.

I saw her face


When she bent down
And kissed the bloom. Then grace
Was Hebe’s crown
Of loveliness, and there! upon
Her brow the light of heaven shone!
THE MUSIC OF MY HEART

The soft night, like a silent child


Before some wondrous thing,
Withholds its breath, as if beguiled
By songs the fairies sing.

It seems to stand and listen, still


As statue in a grove—
Perhaps it hears a fairy trill
A strain Titania wove.

Ah, no, the night hears not her song,


For it would then be glad;
And I have listened here so long,
I know the night is sad.

Now if it be a song that keep


The hour when night should part,
Then night must hear from my soul’s deep,
The music of my heart.
THE TRYST
My love is coming through green fields to me—
Why does she tarry so?
She knows I wait on cliffs above the sea,
And dare not to her go;
For I am prisoned to the spot where love
Has chained my feet, and must not call or move.

My love is gath’ring harebells, where the mead


Is starred with flowers to kiss
Her ling’ring feet; there sedges intercede,
And whisper runes of bliss—
Beseeching her to stay and heed me not—
For she can make a heaven of any spot!

My love is list’ning to the skylark’s song,


Delight is in her ears.
She cannot know her lover yearns so long,
And drinks his salty tears
To quench his thirst for all her winsome grace—
Her absence makes a desert of the place.

My love is drinking in the air which blows


The perfumes of the sea,
The journeying breeze wafts past me—well she knows—
Though me she cannot see!

Her lovely eyes, the yearning west would woo,


Look not on me while blooms in green fields sue.

She knows ’tis deathless love that holds me fast,


Chained to this rock so grim;
That I shall wait for her, until the last
Sun sets o’er ocean’s rim.
That flowers shall die and green fields fade and sear,
Ere I forsake the tryst to greet her here.
NATURE’S LOVELINESS
Yes, everywhere I go
I see the constant flow
Of nature’s loveliness—
But, oh, if I could see
These scenes, my love, with thee,
How bright would be their dress!

I can no more rejoice


Without your gracious voice
Exulting in my ear,
And nature, too, requires
Your soulful, ardent fires,
To beautify the year.

The tender blooms turn pale


When I, alone, through vale
And gully, searching pass;
They seem to say to me,
“Where is your mate? for we
Bloom only for your lass.”

My worship in the glen


Goes up for naught, dear, when
I stand alone in prayer;
The sea, the dunes, the trees,
Chide me, and every breeze
Sings lamentation there.

No, nothing in this world


Where gales and snows have whirled
A joyous tempest down—
Which spread a carpet fine
For thee to tread, can shine
As your belovèd crown.

They do not envy you


They do not envy you,
They love the sweet, the true—
They know you are sincere
As morning’s spark of light
In dew orbs shining bright,
When heaven is blue and clear.

They want your merry laugh,


Like rain for them to quaff;
They want to kiss your feet;
They want to see your eyes—
Full glory of blue skies—
Your smile they yearn to greet.

Come to the woods, my own,


With every blessing known
To man, which you can bring;
Here is your royal goal,
Come, with your joyous soul,
And make all nature sing!
YOU
What is this mystery?
This subtle wonder—you?
Which fills my soul with ecstasy,
My eyes with dew?
What are you, influence, so mild?
As subtle as the air which sways
The stalwart pine. What child
Of nature are you?
Soul obeys your slightest motion.
Mind is set in deep commotion—
By your presence—
By your absence—
Being thrills beneath your glance!
A smile will all my thought enhance.
Touch my lips, and every bliss
Seeks heaven’s glory in a kiss!
You! sweet influence, what art
God used in fashioning you apart
From His renownèd mould,
In the marvellous days of old?
Why, all the elements combined
In making you
The dearest mystery refined,
The ages through!
Yet, what are you? with power
So great to bind my will,
Fast in strong chains each hour;
And every action fill
With echoes of one name,
Resounding in love’s hall of fame?
You! Unlike your kind—
An essence of God’s mind.
An attribute of His deep joy,
When in his toil of love
He fashioned you without alloy,
y y,
The masterpiece to prove,
With every splendid gift—replete.
You—complete!
My earth, sky, sea, and air;
My fruit, flower, jewel rare;
My every need of day and night—
Sun, moon, stars, space; my soul’s delight!
Your name whose syllables are wings
Which waft me high,
Above the fragrant air which brings
Faint eastern aromatics to the sky.
Ever a mystery of art to be,
A subtle influence subjecting me.
Like, fair Hamadryad, created anew—
Ineffable, mystical, wonderful—you!
THE LAST LIGHT

The foothills of Nebraska shine


In a disc of sunset gold;
The cornstalks glisten like pale wine—
But the wind is bitter cold.

Around my love a radiance lies,


’Tis the glow of her soul’s sun;
’Twill light a vision in my eyes—
When the long day’s work is done.
WHEN YOU WERE BORN
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

testbankbell.com

You might also like