AP Computer Science Unit 6 Arrays Pt. 3

AP Computer Science Unit 6 Arrays Pt. 3

10th - 12th Grade

5 Qs

quiz-placeholder

Similar activities

AP Computer Science A

AP Computer Science A

10th - 12th Grade

10 Qs

Java for Geeks and Dummies

Java for Geeks and Dummies

12th Grade - University

10 Qs

1D Arrays

1D Arrays

11th Grade

10 Qs

Arrays

Arrays

10th - 12th Grade

10 Qs

conditional constructs in Java

conditional constructs in Java

10th Grade

10 Qs

AP CSA Review Unit 2

AP CSA Review Unit 2

9th - 12th Grade

10 Qs

AP CSA Classes

AP CSA Classes

9th - 12th Grade

10 Qs

AP Computer Science A Year Review

AP Computer Science A Year Review

9th - 12th Grade

10 Qs

AP Computer Science Unit 6 Arrays Pt. 3

AP Computer Science Unit 6 Arrays Pt. 3

Assessment

Quiz

Computers

10th - 12th Grade

Medium

Created by

Herman Galioulline

Used 8+ times

FREE Resource

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

for (int x : numbers) {
System.out.println(numbers[x]);
}

for (int x : numbers) {
System.out.println(numbers);
}

for (int x : numbers) {
System.out.println(x);
}

for (numbers : int x) {
System.out.println(numbers[x]);
}

for (numbers : int x) {
System.out.println(x);
}

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

Both code segment I and code segment II will print 45.

Both code segment I and code segment II will print 45678.

Code segment I will cause an ArrayIndexOutOfBoundsException and code segment II will print 45.

Code segment I will cause an ArrayIndexOutOfBoundsException and code segment II will print 45678.

Both code segment I and code segment II will cause an ArrayIndexOutOfBoundsException.

3.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

I only

II only

I and III only

II and III only

I, II, and III

4.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

In the for loop header, the initial value of j should be 0.

In the for loop header, the initial value of j should be 2.

The for loop condition should be j < fibs.length - 1.

The for loop condition should be j < fibs.length + 1.

The for loop should increment j by 2 instead of by 1.

5.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

for (int y = 0; y <= arr.length; y++)

for (int y = 0; y < arr.length; y++)

for (int y = x; y < arr.length; y++)

for (int y = x + 1; y < arr.length; y++)

for (int y = x + 1; y <= arr.length; y++)