comp sci final

comp sci final

11th Grade

51 Qs

quiz-placeholder

Similar activities

JLAB Academic Level I

JLAB Academic Level I

9th Grade - University

50 Qs

Tin học giữa kì 2

Tin học giữa kì 2

9th - 12th Grade

49 Qs

Arduino Quiz

Arduino Quiz

9th - 12th Grade

50 Qs

Remidial Quiz Mapel PWB  Kelas 11 TKJ

Remidial Quiz Mapel PWB Kelas 11 TKJ

11th Grade

50 Qs

CNC review

CNC review

9th - 12th Grade

51 Qs

Forensic DNA analysis REVIEW!

Forensic DNA analysis REVIEW!

11th Grade

55 Qs

Đề Cương Ôn Tập Cuối Học Kì 2

Đề Cương Ôn Tập Cuối Học Kì 2

11th Grade

51 Qs

comp sci final

comp sci final

Assessment

Quiz

Other

11th Grade

Medium

Created by

Yathin Mrudul

Used 1+ times

FREE Resource

AI

Enhance your content

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

51 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the proper syntax to initialize an empty 6x6 2D String array?

String[] array = new String[6][6];

int[][] array = new int[6][6];

String[][] array = new String[6];

String[][] array = new String[6][6];

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

int[][] grid = new int[5][3]

What is the value of grid[0].length?

0

5

3

15

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A 2D array is initialized:

int [][] array = {{1,2,3},{4,5,6},{7,8,9}};

What is the result of array[0][1] + array[2][0]?

10

15

9

5

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A 2D double array is declared and initialized to track the terrain of a city park. Each value in the 2D array represents the height of a particular latitude and longitude above sea level. The 2D grid represents the map of the part and each entry in the grid represents the height.

With this in mind, the columns are positioned to represent Longitude in the 2D array and Latitude is represented by each row in the 2D array.

The creator of this 2D array would like to look at the height of the city park along the longitude 100.0 - which traversal method would make the most sense in order to do so?

Row-Major Order

Enhanced for loop

Column-Major Order

This isn’t possible given the 2D array.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A 2D double array terrainMap is declared and initialized to track the terrain of a city park. Each value in the 2D array represents the height of a particular latitude and longitude above sea level. The 2D grid represents the map of the part and each entry in the grid represents the height.

With this in mind, the columns are positioned to represent Longitude in the 2D array and Latitude is represented by each row in the 2D array.

Which of the following would be a correct way to write the traversal for this 2D array?

Media Image
Media Image
Media Image
Media Image

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A 2D double array terrainMap is declared and initialized to track the terrain of a city park. Each value in the 2D array represents the height of a particular latitude and longitude above sea level. The 2D grid represents the map of the part and each entry in the grid represents the height.

With this in mind, the columns are positioned to represent Longitude in the 2D array and Latitude is represented by each row in the 2D array.

Which of the following would be the correct way to print out all the indices that are more than 5 feet above sea level?

Media Image
Media Image
Media Image
Media Image

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

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

int[][] table = { 1, 0, 10, 0, 3, 8, 38, 0 };

int[][] table = { {1, 0, 10, 0}, {3, 8, 38, 0} };

int[][] table = { {1}, {0}, {10}, {0}, {3}, {8}, {38}, {0} };

int[][] table = { "1, 0, 10, 0", "3, 8, 38, 0" };

int[][] table = new int[1, 0, 10, 0][3, 8, 38, 0];

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?