Language: C

#include<stdio.h>
#include<stdlib.h>
struct node
{
    int key;
    struct node *next, *prev;
};

struct node *nil;

void init()
{
    nil=(struct node *)malloc(sizeof(struct node));
    nil->next=nil;
    nil->prev=nil;
}

struct node *listSearch(int keys)
{
    node *cur=nil->next;
    while(cur!=nil && cur->key!=keys)
        cur=cur->next;

    return cur;
}

void insert(int keys)
{
    node *x=(struct node *)malloc(sizeof(struct node));
    x->key=keys;
    //insert
    x->next=nil->next;
    nil->next->prev=x;
    nil->next=x;
    x->prev=nil;
}

void Delete(struct node *t)
{
    if(t==nil) return;
    t->prev->next=t->next;
    t->next->prev=t->prev;
    free(t);
}

void deleteFirst()
{
    Delete(nil->next);
}

void deleteLast()
{
    Delete(nil->prev);
}

void printList()
{
    node *cur=nil->next;
    while(cur->next != nil)
    {
        printf("%d ", cur->key);
        cur=cur->next;
    }
    printf("%d\n", cur->key);
}
int main()
{
    int n, x,i;
    char comm[12];

    scanf("%d", &n);

    init();

    for(i=0; i<n; i++)
    {
        scanf("%s", comm);
        if(comm[0]=='i')
        {
            scanf("%d", &x);
            insert(x);
        }
        if(comm[0]=='d')
        {
            if(comm[6]=='F') deleteFirst();
            else if(comm[6]=='L') deleteLast();
            else
            {
                scanf("%d", &x);
                Delete(listSearch(x));
            }
        }
    }


    printList();

    return 0;
}

Compiler output:
main.c: In function 'listSearch':
main.c:20:5: error: unknown type name 'node'; use 'struct' keyword to refer to the type
   20 |     node *cur=nil->next;
      |     ^~~~
      |     struct 
main.c:20:15: error: initialization of 'int *' from incompatible pointer type 'struct node *' [-Wincompatible-pointer-types]
   20 |     node *cur=nil->next;
      |               ^~~
main.c:21:14: warning: comparison of distinct pointer types lacks a cast [-Wcompare-distinct-pointer-types]
   21 |     while(cur!=nil && cur->key!=keys)
      |              ^~
main.c:21:26: error: request for member 'key' in something not a structure or union
   21 |     while(cur!=nil && cur->key!=keys)
      |                          ^~
main.c:22:16: error: request for member 'next' in something not a structure or union
   22 |         cur=cur->next;
      |                ^~
main.c:24:12: error: returning 'int *' from a function with incompatible return type 'struct node *' [-Wincompatible-pointer-types]
   24 |     return cur;
      |            ^~~
main.c: In function 'insert':
main.c:29:5: error: unknown type name 'node'; use 'struct' keyword to refer to the type
   29 |     node *x=(struct node *)malloc(sizeof(struct node));
      |     ^~~~
      |     struct 
main.c:29:13: error: initialization of 'int *' from incompatible pointer type 'struct node *' [-Wincompatible-pointer-types]
   29 |     node *x=(struct node *)malloc(sizeof(struct node));
      |             ^
main.c:30:6: error: request for member 'key' in something not a structure or union
   30 |     x->key=keys;
      |      ^~
main.c:32:6: error: request for member 'next' in something not a structure or union
   32 |     x->next=nil->next;
      |      ^~
main.c:33:20: error: assignment to 'struct node *' from incompatible pointer type 'int *' [-Wincompatible-pointer-types]
   33 |     nil->next->prev=x;
      |                    ^
main.c:34:14: error: assignment to 'struct node *' from incompatible pointer type 'int *' [-Wincompatible-pointer-types]
   34 |     nil->next=x;
      |              ^
main.c:35:6: error: request for member 'prev' in something not a structure or union
   35 |     x->prev=nil;
      |      ^~
main.c: In function 'printList':
main.c:58:5: error: unknown type name 'node'; use 'struct' keyword to refer to the type
   58 |     node *cur=nil->next;
      |     ^~~~
      |     struct 
main.c:58:15: error: initialization of 'int *' from incompatible pointer type 'struct node *' [-Wincompatible-pointer-types]
   58 |     node *cur=nil->next;
      |               ^~~
main.c:59:14: error: request for member 'next' in something not a structure or union
   59 |     while(cur->next != nil)
      |              ^~
main.c:61:26: error: request for member 'key' in something not a structure or union
   61 |         printf("%d ", cur->key);
      |                          ^~
main.c:62:16: error: request for member 'next' in something not a structure or union
   62 |         cur=cur->next;
      |                ^~
main.c:64:23: error: request for member 'key' in something not a structure or union
   64 |     printf("%d\n", cur->key);
      |                       ^~