Week 2 - Pointers Flashcards
1
Q
What does malloc do?
A
Allocates the requested number of bytes in memory and returns a pointer that points to the start of allocated memory.
2
Q
What does free() do?
A
Takes a pointer as an argument. Deallocates the memory location the pointer points to.