Search Header Logo

Arrays (Computer Science)

Authored by Parris Crowder

KG - University

Used 35+ times

Arrays (Computer Science)
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following are good examples of things to store as arrays or lists? 
I – A to-do list 
II – A grocery list 
III – A ball in a game of breakout 
IV – A list of balls in a game of breakout 
V – A loop counter variable

II only
III and V
I, II, and IV
I, II, III, IV, and V

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

var groceries = ["milk", "sugar", "eggs", "cake"];
What is the value of groceries[2] in the above array?

"milk"
"sugar"
"eggs"
"cake"

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

var shoppingList = ["milk", "eggs", "sugar", "bread", "cake"];
What is the index of the item "bread" in the array shoppingList?

4
3
5
6

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is printed by the following lines of code?

eggs
bread
2
sugar

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

It is possible to have an array with 0 items.

true
false

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output from the following program?

undefined
25
20
25
25
undefined
20
20

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

var arr = [1, 4, 55, 23, 11, 2];
What is the value of arr.length?

5
6
9
2

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?