Which index is the last element in an array called nums at?
CSA Array Unit Test

Quiz
•
Computers
•
9th Grade
•
Medium
Kevin Kamrath
Used 3+ times
FREE Resource
17 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
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
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
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
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
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
Create a free account and access millions of resources
Similar Resources on Quizizz
22 questions
AP CSA Unit 8 Review: 2D Arrays

Quiz
•
9th - 12th Grade
20 questions
Season 5 #Spaic Python Weekly Quiz

Quiz
•
KG - Professional Dev...
18 questions
Y9 List Introduction

Quiz
•
9th Grade
16 questions
STM30243 - TOPIC 4

Quiz
•
9th Grade
19 questions
CS2 Arrays Review

Quiz
•
9th - 12th Grade
15 questions
Unit 8 - Searching and Sorting

Quiz
•
9th - 12th Grade
20 questions
looping and branching statements in C

Quiz
•
9th Grade
12 questions
Java - arrays and String methods

Quiz
•
9th - 12th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University