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

 \( \begin{aligned} \text { Given the following structure definition: } &

\( \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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!