Section 6 Quiz Arrays and Exceptions

Section 6 Quiz Arrays and Exceptions

10th - 12th Grade

21 Qs

quiz-placeholder

Similar activities

QUIZ #1 JAVASCRIPT

QUIZ #1 JAVASCRIPT

11th Grade

16 Qs

Informatica 3c - array ed ordinamento

Informatica 3c - array ed ordinamento

12th Grade

25 Qs

JavaScript Data Structures

JavaScript Data Structures

9th - 12th Grade

19 Qs

JAVA string

JAVA string

12th Grade

20 Qs

C# (основы: переменные, ветвления, циклы, массивы)

C# (основы: переменные, ветвления, циклы, массивы)

10th Grade

20 Qs

Java Lab Code.org AP CSA

Java Lab Code.org AP CSA

9th - 12th Grade

18 Qs

Unit 5 - Two-Dimensional Arrays

Unit 5 - Two-Dimensional Arrays

9th - 12th Grade

19 Qs

UH INFORMATIKA KELAS XI BAB 2

UH INFORMATIKA KELAS XI BAB 2

11th Grade

20 Qs

Section 6 Quiz Arrays and Exceptions

Section 6 Quiz Arrays and Exceptions

Assessment

Quiz

Computers

10th - 12th Grade

Medium

Created by

Annie Bradley

Used 7+ times

FREE Resource

AI

Enhance your content

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

21 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image
What is returned by values[5]?
9
12
6
8

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image
What is the value of values.length?
0
5
6
7

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Index values of an array range from ______________.
0 to length – 1
1 to length
0 to length
0 to length + 1

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Create an array of 12 strings called months.
String[] months = new String[12];
String months = new String[12];
String[] months = new String[];
String[12] months = new String[];

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Based on the statement below, which of the following statements gives the length of the data array?
double[ ] data = new double[10];
data.size()
data.length
data.size
data.length()

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the error in the following code fragment?
double[ ] data = new double[20];
data[20] = 15.25;
A cast is required
data not initialized
A two-dimensional array is required
Out-of-bounds error

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which of the following correctly initializes an array to contain four elements each with value 0?
I. int[ ] arr = { 0, 0, 0, 0};
II. int[ ] arr = new int[4];
III. int[ ] arr = new int[4];
     for(int i = 0; i < arr.length; i++)
       arr[i] = 0;
I only
I and II only
I, II, and III
I and III

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?