Arm Interview Question

Spot the errors in a given C program (consisted of memory leaks and buffer overflows)