Texas Instruments Interview Question

explain how malloc and free works