
2D Arrays
Authored by Alexandria Robles
Computers, Other
9th - 12th Grade
Used 318+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
17 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Given the code, what is in values[2][1] ?
7.9
9.2
7.3
0.5
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Given the code, what is the value of things.length ?
4
3
12
7
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Given the following:
double [][] stuff ;
Which of the following statements constructs an array with 5 rows of 7 columns each and assign its reference to stuff ?
stuff = new stuff[5][7] ;
stuff = new double[5][7] ;
new stuff = double[5][7] ;
stuff = double new[5][7] ;
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Given the code, which of the following fragments prints out every element of items?
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements correctly declares a two-dimensional integer array?
int Matrix[ ] = new int[5,4];
int Matrix[ ]; Matrix = new int[5,4];
int Matrix[ ][ ] = new int[5][4];
int Matrix[ ][ ] = int[5][4];
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How would you get the value "6" out of the following array?
a [0][3]
a [1][3]
a[0][2]
a[2][0]
a[3][1]
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What would the statement a[1].length return?
3
4
2
1
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?