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 Classes44 Questions
Exam 13: Operator Overloading and Templates41 Questions
Exam 14: Exception Handling43 Questions
Exam 15: Recursion43 Questions
Exam 16: Linked Lists40 Questions
Exam 17: Stacks and Queue43 Questions
Exam 18: Searching and Sorting Algorithms40 Questions
Exam 19: Binary Trees43 Questions
Exam 20: Graph Algorithms48 Questions
Exam 21: Standard Template Library41 Questions
Select questions type
Given the following declaration:int j; int sum;
Double sale[10][7];
Which of the following correctly finds the sum of the elements of the fourth column of sale?
Free
(Multiple Choice)
4.8/5
(84)
Correct Answer:
D
Consider the following declaration:char charArray[51]; char discard;
Assume that the input is:Hello There!
How are you?
What is the value of discard after the following statements execute?
![Consider the following declaration:char charArray[51]; char discard; Assume that the input is:Hello There! How are you? What is the value of discard after the following statements execute?](https://storage.examlex.com/TB4785/11ea77fe_9b26_ef72_bbd5_cf38e04bfaa3_TB4785_00.jpg)
Free
(Multiple Choice)
4.8/5
(76)
Correct Answer:
C
The one place where C++ allows aggregate operations on arrays is the input and output of C-strings.
Free
(True/False)
4.9/5
(82)
Correct Answer:
True
The statement int list[25]; declares list to be an array of 26 components, since the array index starts at 0.
(True/False)
4.8/5
(76)
Consider the statement int list[10][8];.Which of the following about list is true?
(Multiple Choice)
4.7/5
(71)
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.8/5
(72)
Assume you have the following declaration double salesData[1000];.Which of the following ranges is valid for the index of the array salesData?
(Multiple Choice)
4.9/5
(81)
Assume you have the following declaration char nameList[100];.Which of the following ranges is valid for the index of the array nameList?
(Multiple Choice)
4.9/5
(73)
Assume you have the following declaration int beta[50];.Which of the following is a valid element of beta?
(Multiple Choice)
4.8/5
(91)
The form of the for loop shown below is called a(n) ____________________ for loop.
for (dataType identifier : arrayName)
statements
(Short Answer)
4.8/5
(89)
Consider the following statement: int alpha[25][10];.Which of the following statements about alpha is true?
(Multiple Choice)
4.7/5
(83)
If an array index goes out of bounds, the program always terminates in an error.
(True/False)
4.7/5
(73)
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
(79)
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.9/5
(90)
Which of the following correctly declares and initializes alpha to be an array of four rows and three columns with the component type int?
(Multiple Choice)
4.8/5
(73)
Showing 1 - 20 of 40
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)