how to make a linked list in c

C
#include <stdio.h>
#include <stdlib.h>
//first we need to make the struct 
typedef struct node{
    int value;
    struct node *next;
}node;

//this function prints the list
void printL(node *head){

    //we make a temporary instance of node in order to store the current node we are on
    node *tmp = head;

    //we do this to print the current nodes value and update the current node
    while(tmp != NULL){
        printf(" %d -->", tmp->value);
        tmp = tmp->next;
    }

    printf("\n");
}

int main(){
    //create these instances of nodes for storage
    node n1, n2, n3;

    //create an instance of node called head to have a beginning point
    node *head;

    //create three variables which represent the address of the above instances
  	//n1, n2, n3
    node *pN1 = &n1;
    node *pN2 = &n2;
    node *pN3 = &n3;

    //set n1, n2 and n3 values
    n1.value = 45;
    n2.value = 8;
    n3.value = 32;

    //now we can link them up
    head = pN1; //we say that the head is the first node
    n1.next = pN2; 
    n2.next = pN3;
    n3.next = NULL;
    
    //this will print the list
  	printL(head);
    return 0;
}// Node of the list
typedef struct node {
    int val;
    struct node * next;
} node_t;

Source

Also in C: