CSA Array Unit Test

CSA Array Unit Test

9th Grade

17 Qs

quiz-placeholder

Similar activities

Input, output and storage de

Input, output and storage de

8th Grade - Professional Development

14 Qs

IT (data, viruses and more)

IT (data, viruses and more)

8th Grade - Professional Development

20 Qs

KTCK 2 - TIN HOC 9 - TRAC NGHIEM

KTCK 2 - TIN HOC 9 - TRAC NGHIEM

9th Grade

12 Qs

ICT WEBINAR QUIZ

ICT WEBINAR QUIZ

KG - Professional Development

20 Qs

Standard Linux Commands

Standard Linux Commands

1st - 10th Grade

20 Qs

Web Dev Diagnostic

Web Dev Diagnostic

7th - 10th Grade

20 Qs

Quis Grade 5

Quis Grade 5

9th - 12th Grade

15 Qs

Dasar Internet 9

Dasar Internet 9

9th Grade

20 Qs

CSA Array Unit Test

CSA Array Unit Test

Assessment

Quiz

Computers

9th Grade

Practice Problem

Medium

Created by

Kevin Kamrath

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...

17 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

Which index is the last element in an array called nums at?

nums.length

nums.length - 1

nums.length + 1

nums.length / 2

2.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

Which of the following declarations will cause a compile time error?

int[] scores = null;

int[] scoreArray = {50, 90, 85};

String[] nameArray = new String[10];

String[] nameArray = {5, 3, 2};

int[] scores = new int[5];

3.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

What is returned from arr[3] if arr={6, 3, 1, 2}?

1

2

3

6

4

4.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

Media Image

What is returned from mystery when it is passed (10, 30, 30, 60)?

17.5

30.0

130

32.5

5.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

Media Image

Given the following values of a and the method doubleLast, what will the values of a be after you execute: doubleLast()?

{-20, -10, 2, 8, 16, 60}

{-20, -10, 2, 4, 8, 30}

{-10, -5, 1, 8, 16, 60}

{-10, -5, 1, 4, 8, 30}

6.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

Media Image

What are the values in a after multAll(3) executes?

{1, 3, -5, -2}

{3, 9, -15, -6}

{2, 6, -10, -4}

The code will never stop executing due to an infinite loop

7.

MULTIPLE CHOICE QUESTION

15 mins • 2 pts

Media Image

Consider the following code segment. Which of the following statements best describes the condition when it returns true?

Whenever the first element in a is equal to val

Whenever a contains any element which equals val

Whenever the last element in a is equal to val

Whenever more than 1 element in a is equal to val

Whenever exactly 1 element in a is equal to val

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?