The document contains C code to reverse a linked list. It defines a Node struct with data and next pointer fields. The reverse function takes the head pointer as a parameter, iterates through the list changing next pointers and prev pointers, and returns the new head. The push function adds nodes to the front of the list. The printList function prints the list data. Main gets input, pushes to the initial empty list, prints it, then calls reverse and prints again.
The document contains C code to reverse a linked list. It defines a Node struct with data and next pointer fields. The reverse function takes the head pointer as a parameter, iterates through the list changing next pointers and prev pointers, and returns the new head. The push function adds nodes to the front of the list. The printList function prints the list data. Main gets input, pushes to the initial empty list, prints it, then calls reverse and prints again.
The document contains C code to reverse a linked list. It defines a Node struct with data and next pointer fields. The reverse function takes the head pointer as a parameter, iterates through the list changing next pointers and prev pointers, and returns the new head. The push function adds nodes to the front of the list. The printList function prints the list data. Main gets input, pushes to the initial empty list, prints it, then calls reverse and prints again.