CS2 Arrays Review

CS2 Arrays Review

9th - 12th Grade

19 Qs

quiz-placeholder

Similar activities

AP Computer Science Principles Arrays

AP Computer Science Principles Arrays

10th - 12th Grade

14 Qs

AP CSA Unit 6 Arrays

AP CSA Unit 6 Arrays

10th - 12th Grade

14 Qs

Arrays Unit

Arrays Unit

10th - 12th Grade

14 Qs

APCSA Unit 6 Arrays

APCSA Unit 6 Arrays

10th - 12th Grade

14 Qs

Area and Arrays

Area and Arrays

10th - 12th Grade

15 Qs

Unit 6 Arrays

Unit 6 Arrays

10th - 12th Grade

14 Qs

APCSA Unit 6

APCSA Unit 6

10th - 12th Grade

14 Qs

APCSA Unit 6.2

APCSA Unit 6.2

10th - 12th Grade

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?