Arrays += Chan
Quiz
•
Computers
•
9th - 12th Grade
•
Hard
Raymond Chan
Used 519+ times
FREE Resource
Enhance your content in a minute
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
Given the following code segment what will be returned when you execute: getIndexOfLastElementSmallerThanTarget(values,-13);
A. -1
B. -15
C. 1
D. You will get an out of bounds error.
2.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
Given the following code segment what would be the elements of a when you execute: doubleLast();
A. {-40, -30, 4, 16, 32, 66}
B. {-40, -30, 4, 8, 16, 32}
C. {-20, -15, 2, 16, 32, 66}
D. {-20, -15, 2, 8, 16, 33}
3.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
What is returned from mystery when it is passed {10, 30, 30, 60}?
A. 17.5
B. 30.0
C. 130
D. 32
E. 32.5
4.
FILL IN THE BLANK QUESTION
15 mins • 1 pt
What is the output of the code segment?
5.
MULTIPLE SELECT QUESTION
15 mins • 1 pt
Select all missing code that works.
int i = ans.length; i >= 0; i--
int i = ans.length-1; i >= 0; i--
int i = ans.length-1; i > 0; i--
int i = 0; i < ans.length; i++
int i = 0; i <= ans.length; i++
6.
MULTIPLE SELECT QUESTION
15 mins • 1 pt
Given an array of length 5, what are the indexes of the middle three elements?
4
2
1
0
3
7.
MULTIPLE SELECT QUESTION
15 mins • 1 pt
Given an array of length 3, called arr, what is the middle element?
arr[1]
2
1
arr[2]
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
14 questions
Intro to Robotics
Quiz
•
9th Grade
10 questions
IT Quiz
Quiz
•
11th - 12th Grade
10 questions
PC1.8 Evaluate computer program
Quiz
•
9th Grade
15 questions
App Inventor
Quiz
•
10th Grade
15 questions
Coding Quiz
Quiz
•
6th - 10th Grade
10 questions
حاسب2 / اختبار الوحدة الثالثة
Quiz
•
10th - 12th Grade
12 questions
Code.org (Introdução à programação)
Quiz
•
5th - 9th Grade
12 questions
Q2 WEEK 3 PRACTICE QUIZ #2
Quiz
•
9th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
