B4 - Two-dimensional Arrays

B4 - Two-dimensional Arrays

University

10 Qs

quiz-placeholder

Similar activities

Bloxburg Quiz

Bloxburg Quiz

1st Grade - Professional Development

13 Qs

FTC as Net Change Accumulator/Trig Integration/FTCII

FTC as Net Change Accumulator/Trig Integration/FTCII

11th Grade - University

14 Qs

C Programming First Quiz - Sec H

C Programming First Quiz - Sec H

University

10 Qs

Java Lesson 9

Java Lesson 9

5th Grade - University

12 Qs

Java Arrays

Java Arrays

5th Grade - University

10 Qs

JAVA FUNDAMENTALS

JAVA FUNDAMENTALS

University

12 Qs

P3 Quiz 😸

P3 Quiz 😸

University

10 Qs

Blind coding

Blind coding

University

15 Qs

B4 - Two-dimensional Arrays

B4 - Two-dimensional Arrays

Assessment

Quiz

Other

University

Medium

Created by

Ahmetcan türk

Used 50+ times

FREE Resource

10 questions

Show all answers

1.

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.

2.

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[3][0] ?

7.3

7.9

9.2

There is no such array element.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

You want to create a table that looks like:

Which of the following will work?

double[][] table =

{ 12, -9, 8,

7, 14,

-32, -1, 0} ;

double[][] table =

{ {12, -9, 8},

{7, 14, 0},

-32, -1, 0} };

double[][] table =

{ {12, -9, 8}

{7, 14}

{-32, -1, 0} };

double[][] table =

{ {12, -9, 8},

{7, 14},

{-32, -1, 0} };

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Given the following:

double[][] things =

{ {1.2, 9.0},

{9.2, 0.5, 0.0},

{7.3, 7.9, 1.2, 3.9} } ;

What is the value of things.length ?

2

3

4

9

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Given the following:

double[][] things =

{ {1.2, 9.0},

{9.2, 0.5, 0.0},

{7.3, 7.9, 1.2, 3.9} } ;

What is the value of things[2].length ?

2

3

4

9

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Given the following:

long[][] 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 long[5][7] ;

stuff = long[5][7] ;

stuff = long[7][5] ;

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Given the following:

int[][] items =

{ {0, 1, 3, 4},

{4, 3, 99, 0, 7 },

{3, 2} } ;

Which of the following statements replaces the 99 with 77?

items[1][2] = 77;

items[2][1] = 77;

items[ 99 ] = 77;

items[2][3] = 77;

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?