You need to understand the concept of Stack overflow and function calling method using stack and then you will understand what the above two programs have