Qualcomm interview question

Code for fsm,digital electronics and sta