Qualcomm Interview Question

Write a function in C to reverse a linked list. Explain the logic behind your implementation and discuss any potential edge cases.