Here is the code to create a link in the list which i read off the internet to try understand linked lists in c:

```
//insert link at first location

    void insertFirst(int key, int data) {
        //create a link
        struct node *link = (struct node*) malloc(sizeof(struct node));

    link->key = key;
    link->data = data;

    //point it to old first node
    link->next = head;

    //point first to new first node
    head = link;
}

```

I am really not understanding how the following line works as a whole:

```
struct node *link = (struct node*) malloc(sizeof(struct node));

```

and more specifically:

```
(struct node*)

```

because my understanding is that the asterisk must come before the pointer name and yet its at the end of the struct name. Please correct me if I'm wrong and please if you can, explain how this works?