
2D Arrays
Authored by Alicia McNett
Computers
University
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
5 questions
Show all answers
1.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Complete this code for a 2D array: int[][] temps = ___ int[5][2];
2.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Complete this for loop code to loop until the end of an array called "grades":
for(int row = 0; row < ___ ; row++) ...
3.
FILL IN THE BLANK QUESTION
1 min • 1 pt
What is missing below order to declare the array as a 3D array:
int[][]___ multiArray;
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In 2D arrays, each row must be the same length (e.g. 2D arrays cannot be ragged/jagged).
True
False
Answer explanation
In a 2D array, each row contains an array that consists of the columns. There is nothing stopping a 2D array from having rows of different sizes.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What value prints below?
int[][] vals = { { 1, 2 }, { 3, 4 } };
System.out.println(vals[0][1]);
1
2
3
4
Answer explanation
The first subscript value (0) means "first row".
The second subscript value (1) means "second column" of that row.
Don't forget that index values start at 0.
Access all questions and much more by creating a free account
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
Already have an account?
Similar Resources on Wayground
10 questions
Struktur dan pemrosesan data
Quiz
•
University
10 questions
IoT Lecture 8 - Data and Analytics for IoT
Quiz
•
University
10 questions
C Programming Quiz-5
Quiz
•
University
10 questions
Advanced SQL
Quiz
•
KG - University
9 questions
Orientação a objetos básica
Quiz
•
University
10 questions
Session 2
Quiz
•
University
10 questions
T_4.2 Identifier, Data Types, Operators & Expressions
Quiz
•
12th Grade - University
10 questions
Quiz-AIML
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade