Skip to content

Instantly share code, notes, and snippets.

@winterrdog
Created June 28, 2024 18:32
Show Gist options
  • Save winterrdog/6adcdd97fb6f7938eb75dc2ea25571bb to your computer and use it in GitHub Desktop.
Save winterrdog/6adcdd97fb6f7938eb75dc2ea25571bb to your computer and use it in GitHub Desktop.
linked list exercise in C
// this is a header file. try to implement all the functions herein. Please labor to understand the structure of a node and try to create it on your own!
#ifndef LIST_H
#define LIST_H 1
typedef struct node node;
typedef struct node {
int data;
node *next;
} node;
// function prototypes/signatures
void display(node *head);
node *find(node *head, int data);
node *add_node(node *head, int data);
void free_list(node *head);
node *delete_node(node *head, node *ep);
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment