Quiz 16 - Arrays and Loops

Quiz
•
Computers
•
11th Grade
•
Medium
Casey Devet
Used 70+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Which type of loop is best for iterating through the values of an array?
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
14 questions
Implementation - PowerPoint 1 Higher

Quiz
•
11th Grade
15 questions
JAVA: Level-1

Quiz
•
5th - 12th Grade
15 questions
Matrici A

Quiz
•
11th Grade
12 questions
C# Arrays

Quiz
•
9th - 12th Grade
14 questions
AP CSA Review

Quiz
•
11th Grade
10 questions
Arrays Javascript (CodeCademy)

Quiz
•
9th - 12th Grade
10 questions
Praktik Lintas Bidang (C++)

Quiz
•
11th Grade
6 questions
Java array

Quiz
•
11th Grade - University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade