how to use list in c code example
Example 1: c list
// Node of the list
typedef struct node {
int val;
struct node * next;
} node_t;
Example 2: creating lists in C
typedef struct node{
int x;
struct node *next;
}node;
node *create_node(int x){
node *new_node = malloc(sizeof(node));
new_node->x = x;
new_node->next = NULL;
return new_node;
}