Exam 6: Using Arrays
Exam 1: A First Program Using C42 Questions
Exam 2: Using Data42 Questions
Exam 3: Using Gui Objects and the Visual Studio Ide42 Questions
Exam 4: Making Decisions42 Questions
Exam 5: Looping42 Questions
Exam 6: Using Arrays42 Questions
Exam 7: Using Methods42 Questions
Exam 8: Advanced Method Concepts42 Questions
Exam 9: Using Classes and Objects42 Questions
Exam 10: Introduction to Inheritance42 Questions
Exam 11: Exception Handling42 Questions
Exam 12: Using Controls42 Questions
Exam 13: Handling Events41 Questions
Exam 14: Files and Streams42 Questions
Select questions type
Arrays are useful when you need to store just one value in memory at a time.
Free
(True/False)
4.9/5
(37)
Correct Answer:
False
To use the Sort() method, you pass the array name to ____.
Free
(Multiple Choice)
4.8/5
(37)
Correct Answer:
C
How can you change the size of an array in C#?
Free
(Essay)
4.8/5
(40)
Correct Answer:
You can change the size of an array associated with an identifier, if necessary. For example, if you declare int [] array; , you can assign five elements later with array = new int [5]; ; later in the program, you might alter the array size to 100 with array = new int [100]; . Still later, you could alter it again to be either larger or smaller. This feature is not allowed in most other programming languages. If you resize an array in this manner, the same identifier refers to a new array in memory and all the values are set to 0.
You can assign nondefault values to array elements at declaration by specifying a list of values called a(n) ____.
(Multiple Choice)
4.8/5
(42)
When using an array in a GUI program, if array values will change based on user input, the array must be ____ any method that reacts to the user's event.
(Multiple Choice)
4.8/5
(38)
You can distinguish each element from the others in an array with a(n) ____.
(Multiple Choice)
4.8/5
(45)
Explain how to use a for loop to perform an arithmetic operation on each element in an array.
(Essay)
4.9/5
(35)
The power of arrays becomes apparent when you use subscripts that are variables rather than constant values.
(True/False)
4.9/5
(44)
A(n) ____________________ array has the same number of elements as an existing array and uses the same subscript to access additional information.
(Short Answer)
4.9/5
(31)
Explain how to assign a value to a specific array element and how to print it.
(Essay)
4.7/5
(35)
The ____________________ property is a member of the System.Array class and automatically holds an array's length.
(Short Answer)
4.9/5
(52)
Match each item with a statement below:
Correct Answer:
Premises:
Responses:
(Matching)
4.9/5
(41)
A search in which each array element is examined in order is called a ____ search.
(Multiple Choice)
4.9/5
(47)
With the foreach statement, you provide a temporary ____ that automatically holds each array value in turn.
(Multiple Choice)
4.9/5
(36)
When you declare objects, their character fields initialize to ____.
(Multiple Choice)
4.8/5
(37)
You can easily navigate through arrays using a for or while loop that varies a subscript from 0 to ____.
(Multiple Choice)
4.8/5
(35)
Showing 1 - 20 of 42
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)