Lecture 5.5 - Recap Of First 5 Flashcards

1
Q

What do data types do?

A

These give bits in memory a meaning. Otherwise they’re simply 0s and 1s.

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

What do structs allow?

A

Allow us to implement custom data structures

Examples : trees, linked lists

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

Where are variables stored?

A

In a fixed memory location. Whether in the heap or a stack depends on how they were allocated.

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

What is a pointer?

A

Pointer is a special variable that holds the address of certain data.

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

In C/C++ how is the stack managed?

A

The stack is managed automatically in those languages, so automatic variables do not have to be freed

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

What is ownership?

A

A concept which allows easier management by tying lifetime of a resource to a stack variable

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