Array Part-2

Array Part-2

University

20 Qs

quiz-placeholder

Similar activities

Arrays

Arrays

4th Grade - Professional Development

20 Qs

ASTS GANJIL Informatika

ASTS GANJIL Informatika

10th Grade - University

20 Qs

C Programming

C Programming

University

20 Qs

DSQUIZ 2020-21

DSQUIZ 2020-21

University

18 Qs

Data Structure Quiz1

Data Structure Quiz1

University

20 Qs

JavaScript Variables, Data Types, and Operators Quiz

JavaScript Variables, Data Types, and Operators Quiz

University

18 Qs

UTS Praktikum SDA KOM B - 2 Ed

UTS Praktikum SDA KOM B - 2 Ed

University

20 Qs

Linked List and Arrays in JAVA

Linked List and Arrays in JAVA

University

16 Qs

Array Part-2

Array Part-2

Assessment

Quiz

Computers

University

Hard

Created by

PRAVEEN SHARMA

Used 2+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these operators is used to allocate memory to array variable in Java?

malloc

alloc

new

new malloc

2.

MULTIPLE CHOICE QUESTION

45 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 (assuming row-major order).

strGrid[0][2] = "S";

strGrid[1][3] = "S";

strGrid[3][1] = "S";

strGrid[2][0] = "S";

strGrid[0][0] = "S";

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

How would you get the value 6 out of the following array

int[][] a = { {2, 4, 6, 8}, {1, 2, 3, 4}};?

a[0][3]

a[1][3]

a[0][2]

a[2][0]

a[3][1]

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

Given the following code segment, what is the value of sum after this code executes?

4

8

9

12

10

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

Given the following code segment, what is the value of sum after this code executes?

{{2 3 3},{1 2 3},{1 1 2},{1 1 1}}

{{2 1 1},{3 2 1},{3 3 2},{3 3 3}}

{{2 1 1 1},{3 2 1 1},{3 3 2 1}}

{{2 3 3 3},{1 2 3 3},{1 1 2 3}}

{{1 1 1 1},{2 2 2 2},{3 3 3 3}}

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

Given the following code segment, what is the value of sum after this code executes?

4

6

9

10

20

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

What are the contents of arr after the following code has been executed?

{{6, 4, 2},{2, 4, 6}}

{{3, 2, 1},{1, 4, 6}}

{{3, 2, 1},{1, 4, 8}}

{{4, 4, 2},{2, 4, 4}}

{{3, 2, 1},{2, 4, 4}}

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?