Module 2: Review of Pointers Flashcards

1
Q

is the memory address of a variable

A

Pointer →

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

Pointer variable →content is a

A

memory address

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

is called the address of

operator

A

ampersand, &,

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

X is a unary operator that

returns the address of its operand

A

address of operator

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

When used as a unary operator, * is the

X operator or Y operator

A

dereferencing

indirection

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

Refers to object to which its operand points

A

dereferencing operator *

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

X creates a new dynamic variable of a
specified type and returns a pointer that points to this new
variable.

A

new operator

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

It is a special area of memory that is reserved for

dynamically allocated variables.

A

heap

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

Any new dynamic variable created by a program

consumes some of the memory in the

A

freestore/heap

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

If there was insufficient available memory to create
the new variable, then new returned a special value
named

A

NULL.

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

• Eliminates a dynamic variable and returns the memory that
the dynamic variable occupied to the freestore manager so
that the memory can be reused.

A

delete

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

If pointer variable pointing to the dynamic variable that was
destroyed and becomes undefined is called

A

dangling

pointers.

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

You can assign a name definition and then use the

type name to declare variables using X

A

typedef

keyword.

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

Is an array whose size is not specified when you write
the program, but is determined while the program is
running

A

dynamic arrays (dynamically-allocated arrays)

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