
comp sci final
Quiz
•
Other
•
11th Grade
•
Medium
Yathin Mrudul
Used 1+ times
FREE Resource
Enhance your content
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?
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?
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple

Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
50 questions
Spring Break Fun
Quiz
•
6th - 12th Grade
50 questions
Arrays in Programming
Quiz
•
11th Grade
50 questions
MapleStory
Quiz
•
KG - University
51 questions
Evaluación de Lengua y Literatura
Quiz
•
3rd Grade - University
50 questions
PSAS_Projek Kreatif dan Kewirausahaan_XI DPIB 2
Quiz
•
11th Grade
50 questions
Note Names on the Treble Staff
Quiz
•
3rd - 12th Grade
48 questions
Tissues
Quiz
•
11th Grade - University
53 questions
International-Pre Quiz
Quiz
•
11th - 12th Grade
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
Discover more resources for Other
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
28 questions
Ser vs estar
Quiz
•
9th - 12th Grade
29 questions
CCG 2.2.3 Area
Quiz
•
9th - 12th Grade
15 questions
PRESENTE CONTINUO
Quiz
•
9th - 12th Grade
13 questions
BizInnovator Startup - Experience and Overview
Quiz
•
9th - 12th Grade
16 questions
AP Biology: Unit 1 Review (CED)
Quiz
•
9th - 12th Grade