Qualcomm interview question

stage 2:tech interview OOP/ cpp basic concept