Pointers (Module 3.2) Flashcards
1
Q
Computer memory (RAM) can be seen as just a giant ___________.
A
array
2
Q
A pointer is a ________ address.
A
memory
3
Q
Every location in memory and every variable has an ____________.
A
address
4
Q
What pointer syntax would declare a pointer to a string named “petPtr”?
A
string* petPtr;
5
Q
is string* a string?
A
No
6
Q
Are pointers just numbers?
A
Yes
7
Q
What would you use to see if a pointer has a valid address?
A
nullptr
8
Q
How would you check if “string* petPtr” has a valid address?
A
string* petPtr = nullptr;