Lesson 6 Flashcards

1
Q

What is an array?

A

An array is a variable having one name that holds a list of items while each item is accessible

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

What is a vector?

A

A similar concept to an array used in other languages

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

What is an element?

A

Each item in an array is called an element

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

Array elements example

A

score[0], score[1], score[2], score[3], score[4]

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

What is the index in an array?

A

The index is each element’s location number

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

What is swapping?

A

switching two variables values with one another

ex.
if x < y
temp = x
x = y
y = temp

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