Introduction to Programming with C++ 3rd Edition Liang Test Bank download
Introduction to Programming with C++ 3rd Edition Liang Test Bank 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
Random documents with unrelated
content Scribd suggests to you:
CHAPTER XXIX
APRIL, MAY, JUNE 1918
Diary of the War
The Germans, finding that their advance was
being brought to a standstill in the direction of 1918
Amiens, turned their attention farther north, and
determined to threaten the Channel ports. On April 9 they began a
concentrated attack with nine divisions on the British and Portuguese
front between Armentières and La Bassée, and the fighting spread
to Messines. Bailleul and Wulverghem, amongst other places, fell,
and the Germans reached the Forest of Nieppe. Here they were
checked, and at the end of April the German effort had spent itself,
although Marshal Foch had been obliged to expend much of his
reserve. The Germans had suffered enormous losses, and, though
the German people rejoiced at the gain of territory, those who knew
the true state of affairs were alarmed at the extravagant expenditure
of men.
At the end of May Ludendorff determined to go straight for Paris,
and with twenty-five divisions overwhelmed the French between
Soissons and Rheims. This German onslaught continued with varying
success until it reached Château-Thierry. The stubborn resistance of
the French made any farther advance impossible, and, although the
battle still raged on a gigantic front, the Germans had to abandon
their intention of striking at Paris.
In April Naval raids on Zeebrugge and Ostend were made, and
two ships filled with concrete were successfully sunk at the entrance
of the Bruges Canal, while an obsolete submarine and two other
ships were blown up off the Mole at Ostend.
In Italy the Austrians began offensive operations on a large scale,
and crossed the Piave River, but the Italians, by a series of
counterattacks, regained the lost ground, and by the end of June
had driven back the Austrians with heavy loss across the river.
1st Batt.
Roll of Officers
2nd Batt.
Roll of Officers
3rd Batt.
Roll of Officers
The following were the officers who took part in the operations
from April 12 to 14:
Lieut.-Colonel W. S. Pilcher, D.S.O. Commanding Battalion.
Capt. C. R. Gerard, D.S.O. Adjutant.
Capt. M. Chapman, M.C. Intelligence Officer.
Lieut. N. R. Abbey Attached B.H.Q.
Capt. H. H. Sloane-Stanley, M.C. No. 1 Company.
2nd Lieut. H. Stratford " "
2nd Lieut. R. B. Osborne " "
Capt. T. T. Pryce, M.C. No. 2 Company.
Lieut. the Hon. C. C. S. Rodney " "
2nd Lieut. G. P. Philipps " "
Lieut. C. S. Nash, M.C. No. 3 Company.
Lieut. M. D. Thomas " "
2nd Lieut. P. H. Cox " "
Lieut. G. R. Green No. 4 Company.
2nd Lieut. J. E. Greenwood " "
2nd Lieut. G. W. Sich " "
Capt. N. Grellier, M.C., R.A.M.C. Medical Officer.
testbankfan.com