AP CSA Unit 8 Review: 2D Arrays

AP CSA Unit 8 Review: 2D Arrays

9th - 12th Grade

22 Qs

quiz-placeholder

Similar activities

STATIC KEYWORD IN JAVA

STATIC KEYWORD IN JAVA

9th - 12th Grade

18 Qs

Java: Chapter 18 Exam

Java: Chapter 18 Exam

9th - 12th Grade

20 Qs

Programming in C language

Programming in C language

12th Grade - University

18 Qs

AP CSA Algorithms Practise

AP CSA Algorithms Practise

11th Grade

22 Qs

CSA Array Unit Test

CSA Array Unit Test

9th Grade

17 Qs

Computer Applications - Library Classes

Computer Applications - Library Classes

10th Grade

19 Qs

G10 | Java - Unit Test 01

G10 | Java - Unit Test 01

10th Grade

20 Qs

AP CS A Unit 6 Exam PRACTICE

AP CS A Unit 6 Exam PRACTICE

9th - 12th Grade

20 Qs

AP CSA Unit 8 Review: 2D Arrays

AP CSA Unit 8 Review: 2D Arrays

Assessment

Quiz

Computers

9th - 12th Grade

Medium

Created by

Alexandria Robles

Used 12+ times

FREE Resource

22 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements correctly declares a two-dimensional integer array?

int Matrix[ ] = new int[5,4];

int Matrix[ ]; Matrix = new int[5,4];

int Matrix[ ][ ] = new int[5][4];

int Matrix[ ][ ] = int[5][4];

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How would you get the value 6 out of the following array int[][] a = {{2, 4, 6, 8}, {1, 2, 3, 4}};? Remember each set of curly braces represents a row, or a single dimensional array.

a [0][3]

a [1][3]

c) a[0][2]

d) a[2][0]

e) a[3][1]

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many columns does a have if it is created as follows

int[][] a = {{2, 4, 6, 8}, {1, 2, 3, 4}};?

3

4

2

1

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

Given the code, what is the value of things.length ?

4

3

12

7

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

Given the code, what is in values[2][1] ?

7.9

9.2

7.3

0.5

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

Given the code, what is in values[0][1] ?

1.2

9.2

9.0

4.8

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What value is at index 1 in this array?  String[] names = {"Mack", "Dennis", "Dee", "Charlie"};
Mack
Dennis
Dee
Charlie

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?