Arrays Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is an array?

A

A big variable that you can get/store values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you declare an array?

A

Dim a(7) as integer

The parenthesis denotes an array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What’s an index? What’s an element?

A
The index (or subscript) is the LOCATION of the element.
The first location is always 0 
So in a(7) there are 8 elements:
Element 0 in A 
Element 1 in A
....
Element 7 in A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How many elements are in the array stNames (9)?

A
There are 10 elements, we begin with subscript 0: 
stNames (0)
stNames (1) 
...
stNames (9)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly