CS Unit 5 Quiz Reveiw

CS Unit 5 Quiz Reveiw

12th Grade

19 Qs

quiz-placeholder

Similar activities

Arrays Unit 6 AP CSA

Arrays Unit 6 AP CSA

10th - 12th Grade

14 Qs

Codehs Unit 6

Codehs Unit 6

10th - 12th Grade

14 Qs

Arrays Unit 6 Computer Science

Arrays Unit 6 Computer Science

10th - 12th Grade

14 Qs

AP CSA Java Arrays

AP CSA Java Arrays

10th - 12th Grade

14 Qs

Practice <ultiple Choice - APCSA

Practice <ultiple Choice - APCSA

9th - 12th Grade

18 Qs

DATA STRUCTURE USING C

DATA STRUCTURE USING C

KG - University

15 Qs

Data Structures

Data Structures

10th Grade - University

18 Qs

Array

Array

10th - 12th Grade

20 Qs

CS Unit 5 Quiz Reveiw

CS Unit 5 Quiz Reveiw

Assessment

Quiz

Computers

12th Grade

Medium

Created by

Chandra Batzel

Used 2+ times

FREE Resource

19 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which of the following arrays has a length of 5?

double[] arr = new double[6];

double[] arr = {0, 1, 2, 3, 4, 5};

double[] arr = new double[]{1, 2.3, 4, 5};

All of the above


None of the above

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which of the following are valid arrays?

I. int[] coolArray = {1, 2, 3};

II. int[] threeThings = {1.0, 2.0, 3.0};

III. int[] = {"1", "2", "3"};


I only

II only

III only

I and II

I and III

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

What would be a correct way to instantiate this 2D array?

Media Image
Media Image
Media Image
Media Image
Media Image

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which is the correct way to construct and assign a 2D array, with 8 rows and 10 columns, to the variable popcorn?


int[8][10] popcorn;


int[8][10] popcorn = new int[8][10];


int[][] popcorn = new int[8][10];


int[8][10] popcorn = new int[][];

int[][] popcorn = new int[][](8, 10);

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

We want to create a 2D double array with 6 rows and 7 columns and assign it to connectFour. Which of these is correct?


double[][] connectFour = new double[6][7];


double[][] connectFour = new connectFour[6][7];


double[][] connectFour = double[6][7];


new double[6][7] connectFour;


double[6][7] connectFour = new double[][];

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

Looking at the image, what is the value of something[1][2]?

6.8

6.1

2.3

1.3

The array does not have an element at that location.

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

Looking at the image, What is the value of something[2][1]?

6.8

6.1

2.3

1.3


The array does not have an element at that location.

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?