Contiguous allocation: You can notice that the addresses of p and (p+3) are separated by an actual offset of 3. The malloc function allocates contiguous memory, all the addresses are one after the other.
Zones: The values of the addresses may change from one execution to the other. However, you may notice that some addresses are closer to each other. Try to add another function, or another local variable, and see how the addresses are grouped.
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.