📜  如何在 C 编程语言代码示例中制作链表

📅  最后修改于: 2022-03-11 15:04:43.330000             🧑  作者: Mango

代码示例1
typedef struct node{
    int value; //this is the value the node stores
    struct node *next; //this is the node the current node points to. this is how the nodes link
}node;

node *createNode(int val){
    node *newNode = malloc(sizeof(node));
    newNode->value = val;
    newNode->next = NULL;
    return newNode;
}