What is output by the code below?
int[] array = {5,7,8,11,4};
out.println( array[0] );
CS2 Arrays Review
Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Donna Panter
Used 1+ times
FREE Resource
19 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is output by the code below?
int[] array = {5,7,8,11,4};
out.println( array[0] );
5
7
11
syntax error
out of bounds exception
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is output by the code below?
int[] array = {5,7,8,11,4};
out.println( array[1] );
5
7
11
syntax error
out of bounds error
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is output by the code below?
int[] array = {5,7,8,11,4};
out.println( array[5/2] );
5
7
8
syntax error
out of bounds error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is output by the code below?
int[] array = {5,7,8,11,4};
out.println(array[array.length-1]);
4
11
8
syntax error
out of bounds error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is output by the code below?
int[] array = {5,7,8,11,4};
out.println(array[array.length]);
4
11
8
syntax error
out of bounds exception
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is output by the code below?
int[] array = {5,7,8,11,4};
out.println(array.length);
4
2
3
1
5
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is output by the code below?
int[] array = {5,7,8,11,4};
for(int i=0; i<array.length/2; i=i+2)
{
array[i]=array[array.length-i-1];
}
System.out.println(array[0]);
5
7
8
4
11
20 questions
APCSA Arrays
Quiz
•
9th - 12th Grade
15 questions
Area With Arrays
Quiz
•
10th - 12th Grade
16 questions
Loops
Quiz
•
5th - 12th Grade
20 questions
Java Arrays
Quiz
•
9th - 12th Grade
15 questions
Topic 3 & 4 Practice - ArrayList and String Methods
Quiz
•
12th Grade
16 questions
Loops Quiz
Quiz
•
9th - 12th Grade
20 questions
Fase F - Array
Quiz
•
11th Grade
19 questions
Grade 10 - Final Exam practice quiz
Quiz
•
10th Grade
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
17 questions
Parts of Speech
Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression
Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing
Quiz
•
9th - 12th Grade
10 questions
Identifying equations
Quiz
•
KG - University