Exam 7: Arrays and Vectors
Exam 1: Introduction to Computers and Programming47 Questions
Exam 2: Introduction to C62 Questions
Exam 3: Expressions and Interactivity45 Questions
Exam 4: Making Decisions51 Questions
Exam 5: Loops and Files60 Questions
Exam 6: Functions49 Questions
Exam 7: Arrays and Vectors56 Questions
Exam 8: Searching and Sorting Arrays30 Questions
Exam 9: Pointers47 Questions
Exam 10: Characters, C-Strings, and More About the String Class47 Questions
Exam 11: Structured Data46 Questions
Exam 12: Advanced File Operations38 Questions
Exam 13: Introduction to Classes54 Questions
Exam 14: More About Classes46 Questions
Exam 15: Inheritance, Polymorphism, and Virtual Functions43 Questions
Exam 16: Exceptions and Templates36 Questions
Exam 17: The Standard Template Library38 Questions
Exam 18: Linked Lists41 Questions
Exam 19: Stacks and Queues47 Questions
Exam 20: Recursion27 Questions
Exam 21: Binary Trees39 Questions
Select questions type
An element of a two-dimensional array is referred to by
Free
(Multiple Choice)
4.7/5
(21)
Correct Answer:
B
The __________ is automatically appended to a character array when it is initialized with a string constant.
Free
(Multiple Choice)
4.9/5
(39)
Correct Answer:
D
What does the following code do?
Const int SIZE = 5;
Double x[SIZE];
For (int i = 2; i <= SIZE; i++)
{
X[i] = 0.0;
}
Free
(Multiple Choice)
4.8/5
(37)
Correct Answer:
D
In C++11 you cannot use a range-based for loop to modify the contents of an array unless you declare the range variable as a reference variable.
(True/False)
4.8/5
(35)
This vector function is used to insert an item into a vector.
(Multiple Choice)
4.9/5
(45)
An individual array element can be processed like any other type of C++ variable.
(True/False)
4.8/5
(41)
Which statement correctly uses C++11 to initalize a vector of ints named n with the values 10 and 20?
(Multiple Choice)
4.8/5
(36)
A vector object automatically expands in size to accommodate the items stored in it.
(True/False)
4.9/5
(28)
A two-dimensional array can have elements of __________ data type(s).
(Multiple Choice)
4.7/5
(35)
The following statement is a valid C++ definition:
double money[25.00];
(True/False)
4.9/5
(33)
What is the last legal subscript that can be used with the following array?
Int values[5];
(Multiple Choice)
4.8/5
(33)
To assign the contents of one array to another, you must use
(Multiple Choice)
4.8/5
(30)
This vector function returns true if the vector has no elements.
(Multiple Choice)
4.9/5
(34)
An array can store a group of values, but the values must be
(Multiple Choice)
4.8/5
(36)
An array of string objects that will hold five names would be declared with which of the following statements?
(Multiple Choice)
4.8/5
(30)
To pass an array as an argument to a function, pass the __________ of the array.
(Multiple Choice)
4.8/5
(33)
Showing 1 - 20 of 56
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)