Starting from:

$29

Assignment 5: Node *my reverse

CS 220, Fall 2017 Assignment 5 – (100 points) 
Instructions •  • For this assignment, you are not allowed to use any library functions not declaredin stdio.h. • Ensure that your code runs on remote.cs.binghamton.edu. • Prototypesmustbeprovidedforallfunctionswithintheheaderfile define.h. • Code must be appropriately commented. • Useful resources: – Common linux commands: http://www.informit.com/blogs/ blog.aspx?uk=The-10-Most-Important-Linux-Commands – http://c-faq.com/ – https://cdecl.org/
Questions 1. (100 points) You are to implement a function: Node *my reverse(Node *head) that reverses a list beginning at Node *head. The return value of this function is a pointer to the head of the newly-reversed linked list. A linked list is a collection of Nodes that are connected to each other using pointers. The last node in a list points to NULL.
The following definition of a Node is provided in define.h, and may not be modified in your submission:
1
struct _Node { union {
int n; char c;
} val; void *ptr; int var;
}; typedef struct _Node Node;

More products