CS2 Arrays Review

CS2 Arrays Review

9th - 12th Grade

19 Qs

quiz-placeholder

Similar activities

MP3 Arrays Test

MP3 Arrays Test

11th Grade

15 Qs

arrays

arrays

12th Grade

15 Qs

APCSA Arrays

APCSA Arrays

9th - 12th Grade

20 Qs

Arrays and Algorithms

Arrays and Algorithms

10th - 12th Grade

15 Qs

Area With Arrays

Area With Arrays

10th - 12th Grade

15 Qs

Arrays, 2D Arrays, and ArrayLists

Arrays, 2D Arrays, and ArrayLists

9th - 12th Grade

15 Qs

Grade 10 - Final Exam practice quiz

Grade 10 - Final Exam practice quiz

10th Grade

19 Qs

Single Array

Single Array

9th Grade - University

14 Qs

CS2 Arrays Review

CS2 Arrays Review

Assessment

Quiz

Computers

9th - 12th Grade

Medium

Created by

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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?