Topic 6.1 Video 2

Topic 6.1 Video 2

11th Grade

6 Qs

quiz-placeholder

Similar activities

Quiz #2 ETEC 486 | Spr. 16

Quiz #2 ETEC 486 | Spr. 16

KG - University

10 Qs

HARD DISK DRIVE

HARD DISK DRIVE

11th - 12th Grade

10 Qs

Chapter 8 Week 1

Chapter 8 Week 1

9th - 12th Grade

11 Qs

System Software

System Software

11th Grade

10 Qs

Printers

Printers

9th - 12th Grade

10 Qs

history of kogama

history of kogama

KG - University

10 Qs

Cloud Computing

Cloud Computing

11th Grade

10 Qs

Computer Basics 2 - CESA

Computer Basics 2 - CESA

7th Grade - University

10 Qs

Topic 6.1 Video 2

Topic 6.1 Video 2

Assessment

Quiz

Computers

11th Grade

Practice Problem

Medium

Created by

Myra Deister

Used 3+ times

FREE Resource

AI

Enhance your content in a minute

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

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

I have viewed the video at https://apclassroom.collegeboard.org/d/3fdsi6azw2?sui=8,6

from start to finish

True
False

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider the following method which is intended to return the position of find within the String referenced at the middle index of arr. You may assume that the length of the arr is odd.


public static int findInMiddle (String [] arr, String find)
{
return /*missing code*/;
}


Which of the following could replace /*missing code*/ to complete the method as specified?

arr[ ].indexOf(find)

arr.indexOf(find)

arr[arr.length/2+1].indexOf(find)

arr[arr.length].indexOf(find)

arr[arr.length/2].indexOf(find)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Consider the method on the left.

The mystery method is called from another method in the same class:

int[ ] list = {3, 7, 2, 9, 8};

int result = mystery(list);

What is stored in result after executing the above code?

2.5

4

8

11

11.5

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Consider the segment of code to the left:

Why does the code cause a compile error?

Since grades is an array of type double, it cannot be used to store int values of 50, 70 and 89.

Since grades is created with an initializer list, the values of the elements of grades cannot be changed.

Elements of arrays cannot be updated based on the current element value, i.e., the += operator cannot be used with array elements.

The grades array contains three elements with indices 0, 1, and 2 therefore grades[3] causes an ArrayIndexOutOfBoundsException to be thrown

The code does not cause a compile error.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider the method to the left.

Which of the following, when occurring in another method in the same class as mystery, would display the value true?

Media Image
Media Image
Media Image
Media Image
Media Image

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Consider the code segment to the left.

What is printed as a result of executing the code segment?

0

8

18

32

ArrayIndexOutOfBoundsException

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?