
TWO-DIMENSIONAL ARRAYS

Quiz
•
Computers
•
University - Professional Development
•
Hard
Shaikha Alkaabi
Used 15+ times
FREE Resource
5 questions
Show all answers
1.
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[ ] = new int[5,4];
int Matrix[ ][ ] = int[5][4];
int Matrix[ ]; Matrix = new int[5,4];
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many columns does a have if it is created as follows
int[][] a = {{2, 4, 6, 8}, {1, 2, 3, 4}};?
1
2
3
4
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
{ {3, 2, 1}, {2, 4, 4} }
{ {4, 4, 2}, {2, 4, 4} }
{ {6, 4, 2}, {2, 4, 6} }
{ {3, 2, 1}, {1, 4, 8} }
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements assigns the letter S to the third row and first column of a two-dimensional array named strGrid?
strGrid[0][2] = "S";
strGrid[1][3] = "S";
strGrid[3][1] = "S";
strGrid[2][0] = "S";
strGrid[0][0] = "S";
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Examine the following:
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[2][1] ?
7.3
7.9
9.2
There is no such array element.
Similar Resources on Wayground
10 questions
WTN-12-QUIZ-3

Quiz
•
University
10 questions
2025 python class first quiz

Quiz
•
9th Grade - University
10 questions
T02: Python - The Basics

Quiz
•
University
10 questions
Python Jetcode

Quiz
•
Professional Development
10 questions
C Program Array and strings

Quiz
•
University
9 questions
C++ Puntatori

Quiz
•
University
10 questions
c programming-Test 1

Quiz
•
Professional Development
10 questions
Variables and Constants

Quiz
•
11th Grade - University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade