
Unit 8 Review

Quiz
•
Mathematics
•
12th Grade
•
Hard
Karen Shih
Used 2+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Which of the following correctly represents the number of items in a 2D array called 'matrix'?
matrix.length - matrix[0].length - 1
matrix.length - matrix[0].length
matrix.length * matrix[0].length
matrix[0].length - matrix.length
2.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Which of the following represents the correct nested loop headers to traverse through a 2D array called "table" of String values?
for (String row : table){ for(String str : row){
for (String[] row : grid){ for(String str : row){
for(String[][]row:table){
for (String[] str :row){
for (String[] row : grid){
for(String[] str : row){
3.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Which of the following statements puts the word "answer" into a 5x5 array of strings at the 2nd column and 4th row?
String[3][1] = "answer"
String[2][4] = "answer"
String[1][3] = "answer"
String[4][2] = "answer"
4.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Which of the following represents the correct way to create a two-dimensional array of strings?
I. String[][] values = new String[][];
II. String[][] values = new [{“A”, “B”}][{“C”, “D”}];
III. String[][] values = {{“A”, “B”}, {“C”, “D”}};
I and III only
I and II only
III only
II only
5.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
int[][] nums = { {1, 9, 3, 2}, {-2, 0, 5, -1},{7, 8, 4, -6} } ;
What is the value of x after the statement has executed?
int x = nums[2][1] * nums[1][2]+nums[0][1] / nums[0][3];
44
-18
-4
24
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int[][] data = new int[4][7];
Which of the following correctly assigns the third row of the table to the numbers 1 through 7?
for(int i = 0; i <= 6; i++) {
data[i][3] = i + 1;
}
for(int i = 1; i <= 7; i++) {
data[2][i-1] = i;
}
for(int i = 0; i <= 6; i++) {
data[i-1][i] = i + 1;
}
for(int i = 0; i <= 7; i++){
data[2][i] = i;
}
7.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
int[][] grid = new int[10][10];
Which of the following code snippets will fill a grid with a multiplication table with multiples of 1 to 10?
for(int a=0;a<grid[0].length; a++) {
for(int b=0;b<grid.length;b++){
grid[a][b] = a * b; }}
for(int a = 0; a < grid.length; a++) { for(int b = 1; b < grid.length; b++) { grid[a+1][b+1] = a * b; }}
for(int a=0;a<grid.length;a++){
for(int b=0;b<grid[0].length; b++){
grid[a][b]=(a+1)*(b+1); }}
for(int a=1;a<grid.length; a++){
for(int b=1;b<grid[0].length; b++){
grid[a][b] = a * b;}}
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Lois de probabilités à densité

Quiz
•
12th Grade
10 questions
Absolute Value Equations & Inequalities

Quiz
•
9th - 12th Grade
10 questions
Transformation on the Coordinate Grid

Quiz
•
8th Grade - University
12 questions
Integral Tentu

Quiz
•
11th Grade - University
10 questions
Transformations on the Coordinate Grid

Quiz
•
8th Grade - University
12 questions
Pythagorean Theorem Converse & Special Right Triangles

Quiz
•
10th - 12th Grade
10 questions
untitled

Quiz
•
9th - 12th Grade
15 questions
Law of Sines & Cosines

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
10 questions
"LAST STOP ON MARKET STREET" Vocabulary Quiz

Quiz
•
3rd Grade
19 questions
Fractions to Decimals and Decimals to Fractions

Quiz
•
6th Grade
16 questions
Logic and Venn Diagrams

Quiz
•
12th Grade
15 questions
Compare and Order Decimals

Quiz
•
4th - 5th Grade
20 questions
Simplifying Fractions

Quiz
•
6th Grade
20 questions
Multiplication facts 1-12

Quiz
•
2nd - 3rd Grade