In this publication titled why use malloc in c, I have provided a complete image from start to finish ,Please look below