2D array flashcard

Flashcard
•
Computers
•
9th - 12th Grade
•
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]
8.
FLASHCARD QUESTION
Front
double[][] values = { {1.2, 9.0, 3.2}, {9.2, 0.5, 1.5, -1.2}, {7.3, 7.9, 4.8} } ; what is in values[3][0] ?
Back
error
Similar Resources on Wayground
10 questions
Foods 1 - 4.01 Quick Breads 10Q

Flashcard
•
9th - 12th Grade
5 questions
Arrays

Flashcard
•
11th Grade
8 questions
Java CH4 - Control Statements EXIT

Flashcard
•
10th - 12th Grade
11 questions
CE-LP2 Noções de Linguagens Procedurais

Flashcard
•
KG - University
12 questions
java while loop

Flashcard
•
9th - 12th Grade
11 questions
Java String Objects & Methods

Flashcard
•
12th Grade
10 questions
Arrays

Flashcard
•
10th - 12th Grade
4 questions
flashcard - Papo formativo_Pensamento computacional_EM_R7

Flashcard
•
KG - University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Appointment Passes Review

Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
Grammar Review

Quiz
•
6th - 9th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
17 questions
[AP CSP] Binary Number System

Lesson
•
9th - 12th Grade
15 questions
1.1 Network Fundamentals Quiz

Quiz
•
10th Grade
20 questions
Understanding Information Processing Cycle

Quiz
•
10th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade