Qualcomm interview question

reverse a linked list in C