Quiz 16 - Arrays and Loops

Quiz 16 - Arrays and Loops

11th Grade

10 Qs

quiz-placeholder

Similar activities

Programming - Arrays

Programming - Arrays

2nd - 12th Grade

10 Qs

Arrays, 2D Arrays, and ArrayLists

Arrays, 2D Arrays, and ArrayLists

9th - 12th Grade

15 Qs

Arrays

Arrays

11th Grade

6 Qs

CodeHS 5.4 & 5.5 ArrayList Stuff

CodeHS 5.4 & 5.5 ArrayList Stuff

9th - 12th Grade

10 Qs

Grade 11 - Quiz 1 Introduction to Arrays

Grade 11 - Quiz 1 Introduction to Arrays

11th Grade

10 Qs

CodeHS 5.7 2D Arrays

CodeHS 5.7 2D Arrays

9th - 12th Grade

10 Qs

2D Arrays

2D Arrays

9th - 12th Grade

12 Qs

Quiz 15 - Array Basics

Quiz 15 - Array Basics

11th Grade

10 Qs

Quiz 16 - Arrays and Loops

Quiz 16 - Arrays and Loops

Assessment

Quiz

Computers

11th Grade

Medium

Created by

Casey Devet

Used 69+ 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

Media Image

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

Media Image

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

Media Image

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?