Cisco Interview Question

How are the function calls implemented ? Where does the memory being allocated for the function calls ?