Arrays Flashcards

1
Q

is a series of elements of the same type
placed in contiguous memory locations that can be individually referenced by adding an index to a unique identifier.

A

Array

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

Declaring arrays:

A

type name [elements];

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

Initializing arrays

A

int foo [5] = { 16, 2, 77, 40, 12071 };

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

Accessing the values of an array

A

name[index]

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

Multidimensional arrays can be described as

A

arrays of arrays

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

is a special type of variable used to store an address.

A

Pointer

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

To declare a pointer, use this syntax:

A

type * pointerName

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

need to be of the same type as the
variable whose address they are storing.

A

Pointers

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

When creating pointers, where you put the space doesn’t matter.

A

True

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

To assign a value to a pointer (the value being an address in memory), use the

A

address of operator (&).

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