Search for question
Question

10. When a node in the linked list is removed (because of the D input) or at the end of the program (you are

required to delete all the nodes in the linked list before terminating the program irrespective of success /

errors.), you are required to free that dynamic memory that was allocated for that node. You must also

ensure that you are not accidentally trying to access a freed memory location (because you still have pointers

or variables pointing to it, etc.). Failing to ensure either of this even for one instance will incur a 2 points

penalty.