Exam 7: Arrays
Exam 1: Introduction to Computers and Programming44 Questions
Exam 2: Introduction to C++56 Questions
Exam 3: Expressions and Interactivity44 Questions
Exam 4: Making Decisions53 Questions
Exam 5: Loops and Files62 Questions
Exam 6: Functions49 Questions
Exam 7: Arrays53 Questions
Exam 8: Searching and Sorting Arrays20 Questions
Exam 10: Characters, C++-Strings, and More About the String Class42 Questions
Exam 11: Structured Data43 Questions
Exam 11: Structured Data50 Questions
Exam 12: Advanced File Operations38 Questions
Exam 13: Introduction to Classes46 Questions
Exam 14: More About Classes40 Questions
Exam 15: Inheritance, Polymorphism, and Virtual Functions38 Questions
Exam 16: Exceptions, Templates, and the Standard Template Library STL39 Questions
Exam 17: Linked Lists40 Questions
Exam 18: Stacks and Queues46 Questions
Exam 19: Recursion21 Questions
Exam 20: Binary Trees38 Questions
Select questions type
Arrays may be ___________ at the time they are __________.
Free
(Multiple Choice)
4.8/5
(66)
Correct Answer:
C
To access an array element, use the array name and the element's
Free
(Multiple Choice)
4.9/5
(81)
Correct Answer:
B
When writing functions that accept multi-dimensional arrays as arguments, _______________ must be explicitly stated in the parameter list.
Free
(Multiple Choice)
4.9/5
(77)
Correct Answer:
B
Each individual element of an array can be accessed by the array name and an element number, called a subscript.
(True/False)
4.8/5
(78)
A vector object automatically expands in size to accommodate the items stored in it.
(True/False)
4.9/5
(82)
What will the following code display?
int numbers[] = { 99, 87, 66, 55, 101 };
for (int i = 1; i < 4; i++)
cout << numbers[i] << endl;
(Multiple Choice)
4.7/5
(69)
What will the following code display? int numbers[4] = { 99, 87 };
Cout << numbers[3] << endl;
(Multiple Choice)
4.9/5
(69)
This vector function is used to insert an item into a vector.
(Multiple Choice)
4.9/5
(80)
A two-dimensional array is like ______________ put together.
(Multiple Choice)
4.9/5
(75)
An element of a two-dimensional array is referred to by __________ followed by ___________.
(Multiple Choice)
4.8/5
(78)
When you pass an array as an argument to a function, the function can modify the contents of the array.
(True/False)
4.8/5
(91)
This vector function returns true if the vector has no elements.
(Multiple Choice)
4.9/5
(87)
What will the following code do?
const int SIZE = 5;
double x[SIZE];
for(int i = 2; i <= SIZE; i++)
{
x[i] = 0.0;
}
(Multiple Choice)
4.9/5
(70)
This vector function returns the number of elements in a vector.
(Multiple Choice)
4.9/5
(79)
What is the last legal subscript that can be used with the following array? int values[5];
(Multiple Choice)
4.9/5
(71)
Showing 1 - 20 of 53
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)