TWO-DIMENSIONAL ARRAYS

TWO-DIMENSIONAL ARRAYS

University - Professional Development

5 Qs

quiz-placeholder

Similar activities

C Programming

C Programming

Professional Development

10 Qs

Two-Dimensional Array

Two-Dimensional Array

University - Professional Development

5 Qs

Python debugging

Python debugging

University

10 Qs

Plot the Code

Plot the Code

University

10 Qs

Bahasa Pemrograman Python

Bahasa Pemrograman Python

University

10 Qs

[20224] CSC301 Quick Exercise 7-1

[20224] CSC301 Quick Exercise 7-1

University

10 Qs

Python-Quiz-Basic-Datatypes

Python-Quiz-Basic-Datatypes

12th Grade - Professional Development

10 Qs

CSC301 Chapter 2

CSC301 Chapter 2

University

10 Qs

TWO-DIMENSIONAL ARRAYS

TWO-DIMENSIONAL ARRAYS

Assessment

Quiz

Computers

University - Professional Development

Hard

Created by

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

Media Image

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.