CS Arrays

Quiz
•
Computers
•
9th - 12th Grade
•
Hard
Thomas Martinez
FREE Resource
34 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which index is the last element in an array called nums at?
nums.length
nums.length - 1
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following declarations will cause a compile time error?
int[] scores = null;
int[] scoreArray = {50,90,85};
String[] nameArray = new String[10];
String[] nameArray = {5, 3, 2};
int[] scores = new int[5];
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is returned from arr[3] if arr={6, 3, 1, 2}?
1
2
3
6
4
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is returned from mystery when it is passed {10, 30, 30, 60}?
17.5
30.0
130
32
32.5
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given the following values of a and the method doubleLast what will the values of a be after you execute: doubleLast()?
{-20, -10, 2, 8, 16, 60}
{-20, -10, 2, 4, 8, 30}
{-10, -5, 1, 8, 16, 60}
{-10, -5, 1, 4, 8, 30}
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements is a valid conclusion. Assume that variable b is an array of k integers and that the following is true:
The value in b[0] does not occur anywhere else in the array
Array b is sorted
Array b is not sorted
Array b contains no duplicates
The value in b[0] is the smallest value in the array
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code segment. Which of the following statements best describes the condition when it returns true?
whenever the first element in a is equal to val
Whenever a contains any element which equals val
Whenever the last element in a is equal to val
Whenever more than 1 element in a is equal to val
Whenever exactly 1 element in a is equal to val
Create a free account and access millions of resources
Similar Resources on Wayground
29 questions
Java Ch. 7 (arrays and ArrayLists

Quiz
•
10th - 12th Grade
30 questions
Bimestral: Programación IV - 4Baco/Baci

Quiz
•
10th Grade
30 questions
Excel Review(formulas, lookups, formattings)

Quiz
•
11th Grade
35 questions
M5 Final review

Quiz
•
11th Grade
30 questions
Strategi Algoritmik dan Pemrograman

Quiz
•
11th Grade
30 questions
Array Basics Quiz

Quiz
•
7th - 11th Grade
31 questions
Java/ Фінальний тест

Quiz
•
9th Grade - Professio...
30 questions
AP CSA - Unit 6 Arrays Test Review

Quiz
•
10th - 12th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade
Discover more resources for Computers
50 questions
Trivia 7/25

Quiz
•
12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade
6 questions
RL.10.1 Cite Evidence

Quiz
•
10th Grade
10 questions
Characteristics of Life

Quiz
•
9th - 10th Grade
14 questions
Algebra 1 SOL Review #1

Quiz
•
9th Grade