Question: ( begin{aligned} text { Given the following structure definition: } & text { struct node_st }{ & text { int data; } &

\( \begin{aligned} \text { Given the following structure definition: } & \text { struct node_st }\{ \\ & \text { int data; } \\ & \quad \text { struct node_st } * \text { next; }\end{aligned} \) Write a C function, reverse_list(), that takes a pointer to a NULL-terminated linked list made up of these structures, reverses the list, and returns a pointer to the new head (the former tail). If the given list is NULL, reverse_list() should return NULL. struct node_st reverse_list (struct node_st I ) \{
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
