Is there a problem with creating linked lists in C language?

-sharpinclude<stdio.h>
-sharpinclude<stdlib.h>

typedef struct node{
    int num;
    struct node *next;
} Node;

int main(void)
{
    Node *link=NULL,*node;
    if(link=(Node *) malloc(sizeof(Node)))
    {
        link->num=-1;
        link->next=NULL;
        node=link->next;
    }
    int i=0;
    for(;i<10;iPP)
    {
        if(node=(Node *) malloc(sizeof(Node)))
        {
            node->num=i;
            node->next=NULL;
            node=node->next;
        }
    }
    for(node=link->next;node;node=node->next)
    {
        printf("%d  ",node->num);
    }
    putchar("\n");
    return 0;
}

running this code does not show any numbers. Why?

C
Mar.16,2021

link->next=NULL;
node=link->next;

after the execution of these two lines, you don't let link- > next point to node , just set node to empty. You should point link- > next to the first node of the linked list

after the for loop.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3eea0-2c47c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3eea0-2c47c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?