Introduction to Programming with C++ 3rd Edition Liang Test Bank instant download
Introduction to Programming with C++ 3rd Edition Liang Test Bank instant download
https://testbankfan.com/product/introduction-to-programming-
with-c-3rd-edition-liang-test-bank/
https://testbankfan.com/product/introduction-to-c-programming-and-
data-structures-4th-edition-liang-solutions-manual/
https://testbankfan.com/product/introduction-to-programming-
with-c-4th-edition-diane-zak-test-bank/
https://testbankfan.com/product/introduction-to-programming-
with-c-4th-edition-diane-zak-solutions-manual/
https://testbankfan.com/product/macroeconomics-3rd-edition-hubbard-
solutions-manual/
Calculus Concepts An Informal Approach to the Mathematics
of Change 5th Edition LaTorre Test Bank
https://testbankfan.com/product/calculus-concepts-an-informal-
approach-to-the-mathematics-of-change-5th-edition-latorre-test-bank/
https://testbankfan.com/product/principles-of-organizational-behavior-
realities-and-challenges-6th-edition-quick-solutions-manual/
https://testbankfan.com/product/aircraft-structures-for-engineering-
students-5th-edition-megson-solutions-manual/
https://testbankfan.com/product/applied-mathematics-for-the-
managerial-life-and-social-sciences-7th-edition-tan-solutions-manual/
https://testbankfan.com/product/calculus-several-variables-
canadian-9th-edition-adams-solutions-manual/
Sales Force Management 10th Edition Johnston Test Bank
https://testbankfan.com/product/sales-force-management-10th-edition-
johnston-test-bank/
Name:_______________________ CSCI 2490 C++ Programming
Armstrong Atlantic State University
(50 minutes) Instructor: Dr. Y. Daniel Liang
1
12 quizzes for Chapter 7
1 If you declare an array double list[] = {3.4, 2.0, 3.5, 5.5}, list[1] is ________.
A. 3.4
B. undefined
C. 2.0
D. 5.5
E. 3.4
2 Are the following two declarations the same
A. no
B. yes
3 Given the following two arrays:
1
A. yes
B. no
6 Suppose char city[7] = "Dallas"; what is the output of the following statement?
A. Dallas0
B. nothing printed
C. D
D. Dallas
7 Which of the following is incorrect?
A. int a(2);
B. int a[];
C. int a = new int[2];
D. int a() = new int[2];
E. int a[2];
8 Analyze the following code:
#include <iostream>
using namespace std;
int main()
{
int list[] = {1, 2, 3, 4, 5};
int newList[5];
reverse(list, 5, newList);
for (int i = 0; i < 5; i++)
cout << newList[i] << " ";
}
#include <iostream>
using namespace std;
2
int main()
{
int x[] = {120, 200, 16};
for (int i = 0; i < 3; i++)
cout << x[i] << " ";
}
A. 200 120 16
B. 16 120 200
C. 120 200 16
D. 16 200 120
10 Which of the following statements is valid?
A. int i(30);
B. int i[4] = {3, 4, 3, 2};
C. int i[] = {3, 4, 3, 2};
D. double d[30];
E. int[] i = {3, 4, 3, 2};
11 Which of the following statements are true?
A. 5
B. 6
C. 0
D. 4
#include <iostream>
using namespace std;
3
int main()
{
int matrix[4][4] =
{{1, 2, 3, 4},
{4, 5, 6, 7},
{8, 9, 10, 11},
{12, 13, 14, 15}};
int sum = 0;
return 0;
}
A. 3 6 10 14
B. 1 3 8 12
C. 1 2 3 4
D. 4 5 6 7
E. 2 5 9 13
15
Which of the following statements are correct?
a. (2 pts)
#include <iostream>
using namespace std;
int main()
{
int a[] = {1, 2};
swap(a[0], a[1]);
cout << "a[0] = " << a[0] << " a[1] = " << a[1] << endl;
return 0;
}
4
b. (2 pts)
#include <iostream>
using namespace std;
int main()
{
int a[] = {1, 2};
swap(a);
cout << "a[0] = " << a[0] << " a[1] = " << a[1] << endl;
return 0;
}
c. (4 pts) Given the following program, show the values of the array
in the following figure:
#include <iostream>
using namespace std;
int main()
{
int values[5];
for (int i = 1; i < 5; i++)
{
values[i] = i;
}
return 0;
}
5
After the last statement
After the array is After the first iteration After the loop is in the main method is
created in the loop is done completed executed
0 0 0 0
1 1 1 1
2 2 2 2
3 3 3 3
4 4 4 4
Part III:
Part III:
<Output>
<End Output>
6
Write a test program that reads a C-string and displays the number of
letters in the string. Here is a sample run of the program:
<Output>
7
Other documents randomly have
different content
occupied with twenty-one such signs, and his fourth chapter with a
hundred more signs and circumstances, in numbered paragraphs. It
is possible that his was the manuscript out of which the botanist
made capital in his title-page; but his meagre list of signs might
have been got from almost any work on almost any febrile disorder,
and is not sufficient to identify Boghurst by, although a word or
phrase here and there is the same. However, Defoe would have seen
Bradley’s title-page, and might have inquired after the Sloane MS.
[1202] Of the six plague-deaths in 1664, three were in Whitechapel
parish, and one each in Aldgate, Cripplegate and St Giles’s-in-the-
Fields.
[1203] Reliquiae Baxterianae. London, 1696, i. 448. This entry in his
journal is dated September 28, 1665, at Hampden, Bucks.
[1204] Ed. cit. Chap. xiv. p. 131:—“Diseases which seem to be
nearest like its (plague’s) nature; which chiefly are fevers, called
pestilent and malignant; for ’tis commonly noted that fevers
sometimes reign popularly, which for the vehemency of symptoms,
the great slaughter of the sick, and the great force of contagion,
scarce give place to the pestilence; which, however, because they
imitate the type of putrid fevers, and do not so certainly kill the sick
as the plague, or so certainly infect others, they deserve the name,
not of the plague, but by a more minute appellation of a pestilential
fever.”
[1205] In a letter from London, 9 May, 1637 (Gawdy MSS. at
Norwich, Hist. MSS. Commis. x. pt. 2. p. 163) it is said: “There is a
strange opinion here amongst the poorer sort of people, who hold it
a matter of conscience to visit their neighbours in any sickness, yea
though they know it to be the infection.”
[1206] Evans, in preface to 1721 edition of Vincent’s book.
[1207] Cal. State Papers.
[1208] Ibid.
[1209] Evans, l. c.
[1210] Reliquiae Baxterianae. London, 1696, ii. 1. 2.
[1211] Milton, with his wife and daughters, spent the summer and
autumn in the same quiet neighbourhood, at Chalfont St Giles, in a
cottage which Ellwood had secured for him, still remaining with its
low ceilings and diamond window-panes. He there showed Ellwood
the manuscript of Paradise Lost, which was published in 1667. The
poem contains no reference to the plague, unless, indeed, the flight
to the country had given point to the lines in the 9th book:
“As one who long in populous city pent,
Where houses thick and sewers annoy the air,
Forth issuing on a summer’s morn, to breathe
Among the pleasant villages and farms,”—
An opportunity arises in the 12th book, where the Plagues of Egypt
come into the prophetic vision of events after the Fall; but the
movement is too rapid to allow of delay, and we have no more than
—
“Botches and blains must all his flesh emboss,
And all his people.”
Gibbon thought that the comet of 1664 (which was generally
remarked upon as a portent of the plague that followed) might have
suggested the lines, ii. 708-11
“and like a comet burn’d,
That fires the length of Ophiuchus huge
In the arctic sky, and from his horrid hair
Shakes pestilence and war.”
Gibbon seems to make a slip in taking these as “the famous lines
which startled the licenser;” those are usually taken to have been i.
598-9, the figure of the sun’s eclipse, which
“with fear of change
Perplexes monarchs.”
[1212] Brit. Mus. Addit. MS. 4376 (8). “Abstract of several orders
relating to the Plague,” from 35 Hen. VIII. to 1665.
[1213] In excavating the foundations of the Broad Street terminus of
the North London Railway, the workmen came upon a stratum four
feet below the surface and descending eight or ten feet lower, which
was full of uncoffined skeletons. Some hundreds of them were
collected and re-interred. (Notes and Queries, 3rd Ser. iv. 85.) The
ground was part of the old enclosure of Bethlem Hospital (St Mary’s
Spital outside Bishopsgate), and was acquired for a cemetery, to the
extent of an acre, by Sir Thomas Roe, in 1569. Probably there were
plague-pits dug in it during more than one of the great epidemics,
from 1593 to 1665.
[1214] Cal. State Papers, Domestic, 1665, p. 579.
[1215] Reliquiae Hearnianae. Ed. Bliss, 1869, ii. 117 (under the date
of Jan. 21, 1721).
[1216] The City Remembrancer. London, 1769 (professing to be
Gideon Harvey’s notes).
[1217] Procopius (De Bello Persico, ii. cap. 23, Latin Translation)
says the same of the great Justinian plague in a.d. 543 at Byzantium:
“ut vere quis possit dicere, pestem illam, seu casu aliquo seu
providentia, quasi delectu diligenter habito, sceleratissimos quosque
reliquisse. Sed haec postea clarius patuerunt.” On this Gibbon
remarks: “Philosophy must disdain the observation of Procopius, that
the lives of such men were guarded by the peculiar favour of fortune
or Providence;” and most men will agree with Gibbon. But, if we
could be sure of the fact of immunity (and Boghurst’s testimony is a
little weakened by his deference to Diemerbroek, who knew the
classical traditions of plague), it might be possible to explain it on
merely pathological grounds.
[1218] John Tillison to Dr Sancroft, September 14, 1665. Harl. MSS.
cited by Heberden, Increase and Decrease of Diseases. London,
1801. Woodall, writing in 1639, and basing on his experience of
London plague in 1603, 1625, and 1636, is in like manner emphatic
that the symptoms varied much in individuals and in seasons.
[1219] Cal. State Papers. Hist. MSS. Com. ix. 321.
[1220] Cal. State Papers. Cal. Le Fleming MSS. p. 37 (also for
Cockermouth).
[1221] Ibid.
[1222] Mead seems to have known that there were plague-cases at
Battle in 1665.
[1223] Cal. S. P.
[1224] Hist. MSS. Com. ii. 115.
[1225] The History and Antiquities of Eyam, with a full and particular
account of the Great Plague which desolated that village a.d. 1666.
By William Wood, London, 1842. This small volume, which owes its
interest solely to the plague-incident, has gone through at least five
editions. Among those who have written, in prose or verse, upon the
same theme, Wood mentions Dr Mead, Miss Seward, Allan
Cunningham, E. Rhodes, S. T. Hall, William and Mary Howitt, S.
Roberts, and J. Holland. The story is also in the Book of Golden
Deeds.
[1226] Bacon (Sylva Sylvarum, Cent. x. § 912. Spedding ii. 643)
says: “The plague is many times taken without a manifest sense, as
hath been said. And they report that, where it is found, it hath a
scent of the smell of a mellow apple; and (as some say) of May-
flowers; and it is also received that smells of flowers that are mellow
and luscious are ill for the plague: as white lilies, cowslips and
hyacinths.”
[1227] Sir Thomas Elyot, in The Castle of Health (1541), says that
“infected stuff lying in a coffer fast shut for two years, then opened,
has infected those that stood nigh it, who soon after died.” (Cited by
Brasbridge, Poor Man’s Jewel, 1578, Chapter viii.)
[1228] Milner’s Hist. of Winchester.
[1229] The City Remembrancer, Lond. 1769, vol. i.—an account of
the plague, fire, storm of 1703, etc., said to have been “collected
from curious and authentic papers originally compiled by the late
learned Dr [Gideon] Harvey.” But the section on the plague is almost
purely Defoe and Vincent, with a few things from Mead.
[1230] These figures, with the two oaths, had been copied by the
antiquary Morant for his History of Essex, and are preserved in No.
87. ff. 55 and 56, of the Stowe MSS. in the British Museum, where
Mr J. A. Herbert, of the Manuscript Department, pointed them out to
me. In his printed History Morant has summarized the plague-deaths
in monthly periods.
The Bearers’ Oath, fol. 57:—
“Ye shall swear, that ye shall bear to the ground and bury the bodys
of all such persons as, during these infectious times, shall dye of the
pestilence within this Towne or the Liberties thereof, or so many of
them as ye shall have notice of, and may be permitted to bury,
carrying them to burials always in the night time, unless it be
otherwise ordered by the Mayor of this Towne; And ye shall be
always in readiness for that purpose at your abode, where you shall
be appointed, keeping apart from your families together with the
searchers, and not to be absent from thence more than your office
of Bearers requires. Ye shall always in your walk, as much as may
be, avoid the society of people, keeping as far distant from them as
may bee, and carrying openly in your hands a white wand, by which
people may know you, and shun and avoid you. And shall do all
other things belonging to the office of Bearers, and therein shall
demean yourselves honestly and faithfully, discharging a good
conscience; So etc.
August 1665. James Barton and
John Cooke:—sworn, who are to have for their pains 10
sh. a week a piece; and 2d for every one to be buried, taking the 2d
out of the estate of the deceased. If there be not wherewithal, the
parish to bear it.
Oath 6. p. 44.
The Oath for the Searchers of the Plague, 1665.
“Yee and either of You shall sweare, that ye shall diligently view and
search the corps of all such persons, as during these infectious
times, shall dye within this Towne or the Liberties thereof, or so
many of them as you shall or may have access unto, or have notice
of; And shall according to the best of your skill, determine of what
disease every such dead corps came to its death. And shall
immediately give your judgment thereof to the Constables of the
parish where such corps shall be found, and to the Bearers
appointed for the burial of such infected corps. You shall not make
report of the cause of any one’s death better or worse than the
nature of the disease shall deserve. Yee shall live together where
you shall be appointed, and not walk abroad more than necessity
requires, and that only in the execution of your office of Searchers.
Ye shall decline and absent yourselves from your families, and
always avoid the society of people. And in your walk shall keep as
far distant from men as may be, always carrying in your hands a
white wand, by which the people may know you, and shun and
avoid you. And ye shall well and truly do all other things belonging
to the office of Searchers, according to the best of your skill,
wisdom, knowledge, and power, in all things dealing faithfully,
honestly, unfeignedly and impartially. So help” etc.
[1231] Morant, Hist. of Essex, I. 74.
[1232] Deering, Nottingham, vetus et nova, 1751, pp. 82-83. Copied
in Thoresby’s edition of Thoroton’s History of Nottingham, II. 60.
*** END OF THE PROJECT GUTENBERG EBOOK A HISTORY OF
EPIDEMICS IN BRITAIN, VOLUME 1 (OF 2) ***
Updated editions will replace the previous one—the old editions will
be renamed.
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the
terms of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if you
provide access to or distribute copies of a Project Gutenberg™ work
in a format other than “Plain Vanilla ASCII” or other format used in
the official version posted on the official Project Gutenberg™ website
(www.gutenberg.org), you must, at no additional cost, fee or
expense to the user, provide a copy, a means of exporting a copy, or
a means of obtaining a copy upon request, of the work in its original
“Plain Vanilla ASCII” or other form. Any alternate format must
include the full Project Gutenberg™ License as specified in
paragraph 1.E.1.
• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
1.F.4. Except for the limited right of replacement or refund set forth
in paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO
OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.
Please check the Project Gutenberg web pages for current donation
methods and addresses. Donations are accepted in a number of
other ways including checks, online payments and credit card
donations. To donate, please visit: www.gutenberg.org/donate.
Most people start at our website which has the main PG search
facility: www.gutenberg.org.
testbankfan.com