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 Collections75 Questions
Exam 9: Introduction to Windows Programming75 Questions
Exam 10: Programming Based on Events74 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 Applications75 Questions
Select questions type
The type used in the foreach expression must match the array type.
Free
(True/False)
4.9/5
(78)
Correct Answer:
True
Array.Copy(waterDepth, 2, w, 0, 5);
-The Copy( )method,shown above,is a(n)____________ method.
Free
(Short Answer)
4.8/5
(66)
Correct Answer:
static or class
To access an array element,you must specify which element is to be retrieved by placing an index inside ____________ following the array identifier
Free
(Short Answer)
4.7/5
(69)
Correct Answer:
square brackets
One of the special properties in the Array class is Length.It returns ____.
(Multiple Choice)
4.8/5
(91)
Use the ____________ keyword to instantiate an object of an array.
(Short Answer)
5.0/5
(85)
When you pass a single array element such as an integer,you are passing by reference.
(True/False)
4.7/5
(90)
Which of the following could be a method heading for a member method that returns an array?
(Multiple Choice)
4.8/5
(82)
A limitation of the foreach loop structure when used with arrays is ____.
(Multiple Choice)
5.0/5
(73)
Which of the following can be used to return an index of an item in an array?
(Multiple Choice)
4.9/5
(69)
The first element of an array is always referenced by index ____________.
(Short Answer)
5.0/5
(74)
All arrays,of any type,inherit characteristics from the ____________ class,which includes a number of predefined methods and properties.
(Short Answer)
4.8/5
(92)
foreach (int val in anotherArray) total += val;
Using the above declaration along with the foreach loop,what is stored in total after the program statements are executed?
(Multiple Choice)
4.8/5
(78)
The length or size of the array is specified using a(n)____________ value in the form of a constant literal,a variable,or an expression that produces an integer value.
(Short Answer)
4.9/5
(64)
double [ ] price = new double [ ] {3, 2.2, 4.7, 6.1, 4};
-Looking above,the value of price.Length is 5.
(True/False)
4.7/5
(74)
Use .NET predefined methods and properties whenever possible as opposed to writing new
code.
(True/False)
4.8/5
(75)
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.9/5
(86)
int [ ] anArray = new int [10];
int [ ] anotherArray = {6, 7, 4, 5, 6, 2, 3, 5, 9, 1};
-Which of the following would copy all of the elements from anotherArray to anArray?
(Multiple Choice)
4.8/5
(73)
____ creates a copy of the array and returns it as an object?
(Multiple Choice)
4.8/5
(79)
Showing 1 - 20 of 75
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)