Lecture 3 Flashcards
Which items go into .h files?
Constant defintions
Type definitions
Function prototypes
What are the five steps in the compilation process?
Pre-process, Compile, Assemble, Link, Load
Where does the heap exist?
Outside the call stack
If a function has a pointer to the heap, it has access to what?
Any memory from the heap
What must be done when working with heaps?
Return the memory to the operating system if finished with it
What library must be included to use heap in c?
stdlib.h
How do we create space?
malloc (memory allocate)
From c’s perspective, a 1D array is what>
Just a pointer
We use stack destroy to do what??
Free the space
If we want dynamic arrays, what do we need?
Malloc or calloc and to use realloc to grow the array size when the array gets full
What are the three types of linked lists?
Singly linked
Doubly linked
Circularly linked