Quick actions

cmd+k|ctrl+k

Navigation

Languages

 Parameter 'a' set but not used

Snippet info

Language

C

Visibility

public

Author

homex

Created

2022-10-30T06:29:54.643775Z

Updated

2022-10-30T06:35:26.27391Z

#include <stdio.h>
#include <stdlib.h>

typedef struct node
{
    int val;
    struct node *next;
}node;

void insert(node *a, int val);

int main(void)
{
    node *n = NULL;
    insert(n, 3);
    printf("%i", n -> val);

}

void insert(node *a, int num)
{
    node *b = malloc(sizeof(node));
    b -> val = num;
    b -> next = NULL;
    a = b;
}
INFO