one dimensional arrays/general array information

0.0(0)
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/7

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

8 Terms

1
New cards

What is an array?

A data structure that can store a collection of data values all under one name.

2
New cards

What is each piece of data in an array called?

An element

3
New cards

What are arrays used for?

To store multiple data values

4
New cards

What is the code for creating an array named ‘rowers’ with 4 elements?

array rowers[4]

5
New cards

What is the code for assigning line 0 of the array ‘rowers’ with the string of “Ivan”?

rowers[0] = “Ivan”

6
New cards

What number do the positions start from?

0

7
New cards

What is the code which retrieves line 0 of the array ‘rowers’?

print(rowers[0])

8
New cards

What are two benefits of combining an array with a FOR loop?

It can search for specific elements/make a similar change to lots of elements.