Pointers (Module 3.2) Flashcards

1
Q

Computer memory (RAM) can be seen as just a giant ___________.

A

array

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

A pointer is a ________ address.

A

memory

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

Every location in memory and every variable has an ____________.

A

address

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

What pointer syntax would declare a pointer to a string named “petPtr”?

A

string* petPtr;

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

is string* a string?

A

No

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

Are pointers just numbers?

A

Yes

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

What would you use to see if a pointer has a valid address?

A

nullptr

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

How would you check if “string* petPtr” has a valid address?

A

string* petPtr = nullptr;

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