Introduction to Programming with C++ 3rd Edition Liang Test Bank - Full Version Is Ready For Free Download
Introduction to Programming with C++ 3rd Edition Liang Test Bank - Full Version Is Ready For Free Download
_____ Follow the link below to get your download now _____
https://testbankdeal.com/product/introduction-to-
programming-with-c-3rd-edition-liang-test-bank/
https://testbankdeal.com/product/introduction-to-c-programming-and-
data-structures-4th-edition-liang-solutions-manual/
https://testbankdeal.com/product/introduction-to-programming-
with-c-4th-edition-diane-zak-test-bank/
https://testbankdeal.com/product/introduction-to-programming-
with-c-4th-edition-diane-zak-solutions-manual/
https://testbankdeal.com/product/corporate-finance-core-principles-
and-applications-4th-edition-ross-test-bank/
Economics 3rd Edition Hubbard Test Bank
https://testbankdeal.com/product/economics-3rd-edition-hubbard-test-
bank/
https://testbankdeal.com/product/cornerstones-of-cost-management-4th-
edition-hansen-solutions-manual/
https://testbankdeal.com/product/technical-communication-14th-edition-
lannon-solutions-manual/
https://testbankdeal.com/product/integrated-marketing-
communications-4th-edition-chitty-test-bank/
https://testbankdeal.com/product/fundamentals-of-futures-and-options-
markets-8th-edition-hull-test-bank/
Laboratory Manual For Anatomy And Physiology Featuring
Martini Art Main Version 6th Edition Wood Test Bank
https://testbankdeal.com/product/laboratory-manual-for-anatomy-and-
physiology-featuring-martini-art-main-version-6th-edition-wood-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
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
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.
testbankdeal.com