2D array flashcard
Flashcard
•
Computers
•
9th - 12th Grade
•
Practice Problem
•
Hard
Wayground Content
FREE Resource
Student preview

8 questions
Show all answers
1.
FLASHCARD QUESTION
Front
How many columns does a have if it is created as follows int[][] a = { {2, 4, 6, 8}, {1, 2, 3, 4}};?
Back
4
2.
FLASHCARD QUESTION
Front
How would you get the value 6 out of the following array: int[][] muffinTin = { {2, 4, 6, 8}, {1, 2, 3, 4}};? Options: muffinTin[0][3], muffinTin[1][3], muffinTin[0][2], muffinTin[2][0], muffinTin[3][1]
Back
muffinTin[0][2]
3.
FLASHCARD QUESTION
Front
for (______________){
Back
int col = 0; col < cookieTray[row].length; col+=2
4.
FLASHCARD QUESTION
Front
Given the following code segment, what is the value of sum after this code executes?
int[][] m = { {1,1,1,1},{1,2,3,4},{2,2,2,2},{2,4,6,8}};
int sum = 0;
for (int k = 0; k < m.length; k++){
sum = sum + m[m.length-1-k][1]; }
Back
9
5.
FLASHCARD QUESTION
Front
How many rows does cupcakeTin have if it is created as follows:
int[][] cupcakeTin = { {2, 4, 6, 8},
{1, 2, 3, 4}};?
Back
2
6.
FLASHCARD QUESTION
Front
Which of the following statements assigns the letter S to the third row and first column of a two-dimensional array named strGrid (assuming row-major order): strGrid[0][2] = "S"; strGrid[1][3] = "S"; strGrid[3][1] = "S"; strGrid[2][0] = "S";
Back
strGrid[2][0] = "S";
7.
FLASHCARD QUESTION
Front
How would you get the value 6 out of the following array:
int[][] a = { {2, 4, 6, 8},{1, 2, 3, 4}};?
Back
a[0][2]
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
1 questions
Создание текстуры для 3D-объекта
Flashcard
•
KG
4 questions
Supplier Vocabulary Flashcards
Flashcard
•
KG - University
10 questions
Сущность и содержание менеджмента
Flashcard
•
KG
14 questions
CADEIA ALIMENTAR
Flashcard
•
KG
11 questions
Digital Marketing Strategies in Agriculture
Flashcard
•
KG
4 questions
FLASHCARD LESSON -GRADE 7&8 NLC INTERVENTION
Flashcard
•
8th Grade - University
5 questions
Statistika Pemusatan Data
Flashcard
•
10th Grade
7 questions
Es-tu prudent(e) ou téméraire ?
Flashcard
•
KG - 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
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
20 questions
Figurative Language Review
Quiz
•
6th Grade