Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
C# Programming From Problem Analysis to Program Design Study Set 1
Quiz 7: Arrays
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 41
Multiple Choice
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?
Question 42
Multiple Choice
One of the special properties in the Array class is Length. It returns ____.
Question 43
Multiple Choice
BinarySearch( ) is ____.
Question 44
Multiple Choice
____ creates a copy of the array and returns it as an object?
Question 45
Multiple Choice
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:
Question 46
Multiple Choice
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?
Question 47
Multiple Choice
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?
Question 48
Multiple Choice
If an array is to be sent to a method, which of the following is a valid heading for a method?
Question 49
Multiple Choice
Which of the following could be a method heading for a member method that returns an array?
Question 50
Multiple Choice
When two or more arrays have a relationship such that you are able to use the same subscript or index to refer to related elements in the arrays, you have ____ arrays.
Question 51
Multiple Choice
Which of the following is a valid example of calling a method and sending it an array argument?
Question 52
Multiple Choice
Given an array declaration of int anArray[1000], which of the following would be a valid heading for a method that sends the array in as a parameter?
Question 53
Multiple Choice
Given an array declaration of int anArray[1000], which of the following would be a valid call to a DisplayContents( ) method to send the full array into the method as an argument?
Question 54
Multiple Choice
Which of the following can be used to return an index of an item in an array?
Question 55
Multiple Choice
int [ ] score = {86, 66, 76, 92, 95, 88}; for (int i = score.Length-1; i > -1; i--) { Total += score[i]; } Using the declaration above for score, what is added to total during the first iteration?
Question 56
Multiple Choice
What happens when you assign one array to another using the assignment operator?
Question 57
Multiple Choice
int [ ] anArray = new int [10]; int [ ] anotherArray = {6, 7, 4, 5, 6, 2, 3, 5, 9, 1}; 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?