Lecture 3 Flashcards

1
Q

Which items go into .h files?

A

Constant defintions
Type definitions
Function prototypes

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

What are the five steps in the compilation process?

A

Pre-process, Compile, Assemble, Link, Load

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

Where does the heap exist?

A

Outside the call stack

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

If a function has a pointer to the heap, it has access to what?

A

Any memory from the heap

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

What must be done when working with heaps?

A

Return the memory to the operating system if finished with it

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

What library must be included to use heap in c?

A

stdlib.h

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

How do we create space?

A

malloc (memory allocate)

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

From c’s perspective, a 1D array is what>

A

Just a pointer

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

We use stack destroy to do what??

A

Free the space

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

If we want dynamic arrays, what do we need?

A

Malloc or calloc and to use realloc to grow the array size when the array gets full

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

What are the three types of linked lists?

A

Singly linked
Doubly linked
Circularly linked

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