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.
2
Q
What do structs allow?
A
Allow us to implement custom data structures
Examples : trees, linked lists
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.
4
Q
What is a pointer?
A
Pointer is a special variable that holds the address of certain data.
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
6
Q
What is ownership?
A
A concept which allows easier management by tying lifetime of a resource to a stack variable