Which type of loop is best for iterating through the values of an array?
Quiz 16 - Arrays and Loops

Quiz
•
Computers
•
11th Grade
•
Medium
Casey Devet
Used 69+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
for loop
while loop
2.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Which expression will get the length of the array called "ages"?
ages.length()
ages.size()
ages.length
ages.size
3.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
This code is supposed to print out all the elements of the array "scores", but it isn't working. What needs to be fixed?
Use <= instead of <
Start index at 0
Use index-- instead of index++
Use > instead of <
4.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
This code is supposed to print out all the elements of the array "scores", but it isn't working. What needs to be fixed?
Use < instead of <=
Start index at 1
Use index-- instead of index++
Use >= instead of <=
5.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
This code is supposed to print out all the elements of the array "scores", but it isn't working. What needs to be fixed?
Use <= instead of <
Start index at 1
Use > instead of <
Print scores[index] instead of scores
6.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
int size = input.nextInt();
The command above got an integer from the user. Which instruction would create an array with "size" elements?
int [] myArray = new int [size];
int myArray = new int [size];
int [size] myArray = new int [];
int myArray = new int (size);
7.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What do we call two or more arrays which store related data at the same index?
compact arrays
cooperating arrays
constant arrays
co-related arrays
Create a free account and access millions of resources
Similar Resources on Wayground
11 questions
CodeHS 5.3 Using Arrays

Quiz
•
9th - 12th Grade
10 questions
Quiz 15 - Array Basics

Quiz
•
11th Grade
10 questions
8.2 Arrays Cambridge IGCSE 0478

Quiz
•
10th Grade - University
15 questions
AP Computer Science A Review 1

Quiz
•
10th - 12th Grade
6 questions
Topic 6.1 Video 2

Quiz
•
11th Grade
10 questions
AP CS A Unit 6 Quiz PRACTICE

Quiz
•
9th - 12th Grade
7 questions
Reviewing Arrays

Quiz
•
11th Grade
15 questions
Data Structures Quiz

Quiz
•
11th Grade
Popular Resources on Wayground
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice

Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers

Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade