Search Header Logo

CS Unit 5 Quiz Reveiw

Authored by Chandra Batzel

Computers

12th Grade

Used 2+ times

CS Unit 5 Quiz Reveiw
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

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.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?