Linked list sorting in C
I'm writing a simple file for one of my classes that is a simple linked list activity and I need to sort a linked list. This is my source code so far: /* * Simple list manipulation exercise. * 1. Create a list of integers. * 2. Print the list. * 3. Sort the list. * 4. Print the list * 5. Free the list nodes. */ #include <stdlib.h> #include <stdio.h> struct node { int value ; struct node *next ; } ; extern struct node *mk_node(int v) ; extern void print_list(struct node *head) ; extern struct node *sort_list(struct node *head) ; extern void free_list(struct node *head) ; #define NVALUES (6) int