Qualcomm interview question

Design Protocol and implement in C