Last active
August 29, 2015 14:25
-
-
Save raju249/24d85a43912cd2b2e644 to your computer and use it in GitHub Desktop.
A linked list in C
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is the code for linked list in C. | |
// This includes functions for insert,delete,search and traverse | |
// I used the distribution code from my course CS50 by Porf.David.J.Malan | |
#include <cs50.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
// Defines a node for linked list | |
typedef struct node | |
{ | |
int n; | |
struct node* next; | |
} | |
node; | |
// linked list | |
node* first = NULL; | |
// prototypes | |
void delete(void); | |
void insert(void); | |
void search(void); | |
void traverse(void); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment