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 Quizizz
15 questions
Unit 8 - Searching and Sorting

Quiz
•
9th - 12th Grade
10 questions
AP CS A Unit 6 Quiz PRACTICE

Quiz
•
9th - 12th Grade
12 questions
C# Arrays

Quiz
•
9th - 12th Grade
15 questions
Java Arrays Prt 1Quiz

Quiz
•
9th - 12th Grade
10 questions
Arrays and Lists

Quiz
•
6th - 12th Grade
15 questions
AP Computer Science A Review 1

Quiz
•
10th - 12th Grade
10 questions
Advanced Java Study Guide

Quiz
•
11th - 12th Grade
10 questions
C Programming - Dia Aberto - EPC

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
20 questions
Types of Credit

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

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