Exam 7: Arrays
Exam 1: Introduction to Computing and Programming75 Questions
Exam 2: Data Types and Expressions75 Questions
Exam 3: Methods and Behaviors75 Questions
Exam 4: Creating Your Own Classes75 Questions
Exam 5: Making Decisions75 Questions
Exam 6: Repeating Instructions75 Questions
Exam 7: Arrays75 Questions
Exam 8: Advanced Collections74 Questions
Exam 9: Introduction to Windows Programming75 Questions
Exam 10: Programming Based on Events75 Questions
Exam 11: Advanced Object-Oriented Programming Features75 Questions
Exam 12: Debugging and Handling Exceptions75 Questions
Exam 13: Working With Files75 Questions
Exam 14: Working With Databases75 Questions
Exam 15: Web-Based Applications73 Questions
Select questions type
Array elements are normally stored in contiguous, side-by-side, memory locations with the first index in all arrays being referenced by index 0.
(True/False)
4.9/5
(78)
Array.Copy(waterDepth, 2, w, 0, 5);
The Copy( ) method, shown above, is a(n) ____________ method.
(Short Answer)
4.9/5
(79)
If you do not know the size of the array needed, you can create an array large enough to hold any number of entries and tell users to enter a predetermined sentinel value after they enter the last value. Using this approach:
(Multiple Choice)
4.8/5
(82)
All arrays, of any type, inherit characteristics from the ____________ class, which includes a number of predefined methods and properties.
(Short Answer)
5.0/5
(75)
double [ ] price = new double [ ] {3, 2.2, 4.7, 6.1, 4};
With the declaration above, price[2] refers to 2.2.
(True/False)
4.8/5
(79)
When you do a compile-time initialization of array elements, values are separated by ____________.
(Short Answer)
4.7/5
(74)
The first element of an array is always referenced by index ____________.
(Short Answer)
4.9/5
(83)
In C# the length of an array cannot be changed. After it is instantiated with a length, dynamic resizing is not an option.
(True/False)
4.8/5
(80)
Which loop structure can be used to change the contents of the array?
(Multiple Choice)
4.8/5
(69)
When you pass an array to a method, by default, a copy of each element in the array is made and passed to the method.
(True/False)
4.8/5
(78)
To create an array to hold the 5 numeric scores, you could write ____________.
(Short Answer)
5.0/5
(81)
The type used in the foreach expression must match the array type.
(True/False)
4.9/5
(87)
All data values placed in an array must be of the same ____________.
(Short Answer)
4.7/5
(84)
int [ ] anArray = new int [10];
Int [ ] anotherArray = {6, 7, 4, 5, 6, 2, 3, 5, 9, 1};
How could all values of anotherArray be totaled?
(Multiple Choice)
4.7/5
(82)
Which of the following can be used to return an index of an item in an array?
(Multiple Choice)
4.7/5
(77)
Arrays are ____________ variables. The array identifier memory location does not actually contain the values, but instead stores an address indicating the location of the first element in the array.
(Short Answer)
4.8/5
(73)
There are several ways to do a compile-time initialization of arrays. All of the following are valid ways EXCEPT ____.
(Multiple Choice)
4.9/5
(78)
int [ ] anArray = new int [10]; int [ ] anotherArray = {6, 7, 4, 5, 6, 2, 3, 5, 9, 1};
For (int i = 0; i < anotherArray.Length; i++)
Total += i;
Using the above declaration along with the for loop, what is stored in total after the program statements are executed?
(Multiple Choice)
4.7/5
(74)
Showing 21 - 40 of 75
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)