Qualcomm interview question

Heavily based on pointers and C++, bit manipulation