Qualcomm Interview Question

Going through code snippets and finding issues/ changing code