Exam 8: Arrays
Exam 1: An Overview of Computers and Programming Languages40 Questions
Exam 2: Basic Elements of C++50 Questions
Exam 3: Inputoutput40 Questions
Exam 4: Control Structures I Selection40 Questions
Exam 5: Control Structures II Repetition40 Questions
Exam 6: User-Defined Function41 Questions
Exam 7: Namespaces, the Class String, and User-Defined Simple Data Types40 Questions
Exam 8: Arrays40 Questions
Exam 9: Records Structs40 Questions
Exam 10: Classes and Data Abstraction43 Questions
Exam 11: Inheritance and Composition41 Questions
Exam 12: Pointers, Classes, Virtual Functions, and Abstract Classes43 Questions
Exam 13: Overloading and Templates41 Questions
Exam 14: Exception Handling42 Questions
Exam 15: Recursion41 Questions
Exam 16: Searching and Sorting46 Questions
Exam 17: Linked Lists41 Questions
Exam 18: Stacks and Queues42 Questions
Select questions type
What is the output of the following C++ code? 
Free
(Multiple Choice)
4.9/5
(69)
Correct Answer:
C
Assume you have the following declaration double salesData[1000];. Which of the following ranges is valid for the index of the array salesData?
Free
(Multiple Choice)
4.8/5
(80)
Correct Answer:
A
What is the value of alpha[2] after the following code executes? ![What is the value of alpha[2] after the following code executes?](https://storage.examlex.com/TB4784/11ea7810_13f5_ffe5_bbd5_bba0112947b5_TB4784_00.jpg)
Free
(Multiple Choice)
4.9/5
(78)
Correct Answer:
C
Arrays can be passed as parameters to a function by value, but it is faster to pass them by reference.
(True/False)
4.9/5
(89)
After the following statements execute, what are the contents of matrix? 
(Multiple Choice)
5.0/5
(66)
Consider the following statement: double alpha[10][5];. The number of components of alpha is ____.
(Multiple Choice)
4.8/5
(80)
Consider the following statement: int alpha[25][10];. Which of the following statements about alpha is true?
(Multiple Choice)
4.7/5
(71)
The ____________________ of an array is the address (that is, the memory location) of the first array component.
(Short Answer)
4.9/5
(79)
If an array index goes out of bounds, the program always terminates in an error.
(True/False)
4.9/5
(77)
The statement int list[25]; declares list to be an array of 26 components, since the array index starts at 0.
(True/False)
5.0/5
(80)
Suppose list is a one dimensional array of size 25, wherein each component is of type int. Further, suppose that sum is an int variable. The following for loop correctly finds the sum of the elements of list.

(True/False)
4.9/5
(101)
For a list of length n, the ____________________ sort makes exactly (n(n - 1))/2 key comparisons and 3(n - 1) item assignments.
(Short Answer)
4.8/5
(80)
Consider the following declaration: int alpha[5] = {3, 5, 7, 9, 11};. Which of the following is equivalent to this statement?
(Multiple Choice)
4.8/5
(84)
In a(n) ____________________ data type, each data item is a collection of other data items.
(Short Answer)
4.9/5
(73)
Consider the statement int list[10][8];. Which of the following about list is true?
(Multiple Choice)
4.8/5
(85)
A collection of a fixed number of elements (called components) arranged in n dimensions (n >= 1) is called a(n) ____.
(Multiple Choice)
4.8/5
(89)
When you pass an array as a parameter, the base address of the actual array is passed to the formal parameter.
(True/False)
4.7/5
(79)
Given the following declaration:
which of the following correctly finds the sum of the elements of the fifth row of sale?
(Multiple Choice)
4.9/5
(92)
Which of the following correctly declares name to be a character array and stores "William" in it?
(Multiple Choice)
4.9/5
(83)
Showing 1 - 20 of 40
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)