Multiple-Choice Quiz on Java Arrays

Multiple-Choice Quiz on Java Arrays

University

15 Qs

quiz-placeholder

Similar activities

BDS Biochem Quiz July 2021 - 4

BDS Biochem Quiz July 2021 - 4

University

10 Qs

MẠCH ỔN ÁP

MẠCH ỔN ÁP

University

12 Qs

Minecraft Quiz

Minecraft Quiz

KG - University

18 Qs

GETARAN, GELOMBANG, DAN BUNYI DALAM KEHIDUPAN SEHARI-HARI

GETARAN, GELOMBANG, DAN BUNYI DALAM KEHIDUPAN SEHARI-HARI

1st Grade - University

20 Qs

Rute Topikal Biofarmasetika

Rute Topikal Biofarmasetika

University

10 Qs

KUIS TPSK 1 SUPERINTENSIF

KUIS TPSK 1 SUPERINTENSIF

12th Grade - University

10 Qs

PMBOK - Gestión de Costos

PMBOK - Gestión de Costos

University - Professional Development

10 Qs

BDS Biochem Quiz - Sept 2

BDS Biochem Quiz - Sept 2

University

10 Qs

Multiple-Choice Quiz on Java Arrays

Multiple-Choice Quiz on Java Arrays

Assessment

Quiz

Other

University

Practice Problem

Medium

Created by

Robin Arcilla

Used 5+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What is the length of the following array: byte[] data = { 12, 34, 9, 0, -62, 88 };

5

6

7

8

2.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What is the output of the following code fragment? int[] egArray = { 2, 4, 6, 8, 10, 1, 3, 5, 7, 9 }; for (int index = 0; index < 5; index++) System.out.print(egArray[index] + " ");

2 4 6 8 10

2 4 6 8 1

2 4 6 8 0

2 4 6 8

3.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What is the output of the following code fragment? int[] egArray = { 2, 4, 6, 8, 10, 1, 3, 5, 7, 9 }; for (int index = 0; index < egArray.length; index++) System.out.print(egArray[index] + " ");

2 4 6 8 10 1 3 5 7 9

2 4 6 8 1 3 5 7 9

2 4 6 8 10

2 4 6 8

4.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What is the output of the following code fragment? int[] egArray = { 2, 4, 6, 8, 10, 1, 3, 5, 7, 9 }; for (int index = 0; index < egArray.length; index = index + 2) System.out.print(egArray[index] + " ");

2 6 10 3 7

2 8 10 5 9

2 6 10 7

2 8 3 7

5.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Examine the following program fragment: int[] array = { 1, 4, 3, 6, 8, 2, 5 }; int what = array[0]; for (int index = 0; index < array.length; index++) { if (array[index] > what) what = array[index]; } System.out.println(what); What does the fragment write to the monitor?

1

5

8

6

6.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Examine the following program fragment: int[] array = { 1, 4, 3, 6, 8, 2, 5 }; int what = array[0]; for (int index = 0; index < array.length; index++) { if (array[index] < what) what = array[index]; } System.out.println(what); What does the fragment write to the monitor?

1

5

8

0

7.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Examine the following program fragment: int[] array = { 1, 4, 3, 6 }; int what = 0; for (int index = 0; index < array.length; index++) { what = what + array[index]; } System.out.println(what); What does the fragment write to the monitor?

10

11

14

15

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?