
Array Basics Quiz
Authored by Arasaka Teacher
Computers
7th - 11th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following code create? int[] numbers = new int[5];
An array that can store 5 decimal numbers
An array that can store 4 whole numbers
A single whole number variable with the value 5
An array that can store 5 whole numbers
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
After running int[] numbers = new int[5], what is the value of numbers[2]?
2
null
undefined
0
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int[] scores = {85, 92, 78, 95, 88};
int x = scores[1] + scores[3];
System.out.println(x);
What is the output of the code above?
163
187
170
180
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int[] values = {4, 8, 12, 16};
values[2] = values[0] + values[1];
System.out.println(values[2]);
What is the output of the code above?
12
16
20
24
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given: int[] data = new int[4]; Which of these lines will cause an ArrayIndexOutOfBoundsException?
data[0] = 5;
data[3] = 12;
data[4] = 8;
data[2] = 15;
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which line correctly creates an array to store 6 string values?
String names[6];
String[] names = new String[6];
String[] names = 6;
names[] = new String[6];
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the index of the first element in an array?
1
-1
0
None of the above
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
25 questions
PTS Mulok 2
Quiz
•
10th Grade
25 questions
CSS 9 Achievement part two
Quiz
•
9th Grade
25 questions
Quiz Struktur Data
Quiz
•
10th Grade
25 questions
1st Period Feb 22, 2024 - Virtual AP CompSci AP
Quiz
•
9th - 12th Grade
29 questions
BLENDER INTRO_2
Quiz
•
9th - 12th Grade
25 questions
Windows Vocab
Quiz
•
6th - 8th Grade
26 questions
Legislation and Privacy Quiz
Quiz
•
9th Grade
25 questions
Java Review
Quiz
•
9th Grade - University
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
10 questions
Exploring Valentine's Day with Charlie Brown
Interactive video
•
6th - 10th Grade
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
20 questions
El Verbo IR Practice
Quiz
•
9th Grade
14 questions
Volume of rectangular prisms
Quiz
•
7th Grade
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
10 questions
Valentine's Day History and Traditions
Interactive video
•
6th - 10th Grade
20 questions
Laws of Exponents
Quiz
•
8th Grade
11 questions
Valentines Day
Quiz
•
6th - 8th Grade