Qualcomm Interview Question

resource allocation for C++ class