Pergunta de entrevista da empresa Qualcomm

question from multithreaded programming . i dont remember the ques