Language: C

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

struct Node{
    int key;
    Node *prev, *next;
};

Node *nil;

void init(){ // ???????????????
    nil = (Node*)malloc(sizeof(Node));
    nil->next = nil;
    nil->prev = nil;
}

void insert(int key){
    Node *x = (Node*)malloc(sizeof(Node));
    x->key = key;
    x->next = nil->next;
    nil->next->prev = x;
    nil->next = x;
    x->prev = nil;
}

Node* listSearch(int key){
    Node* cur = nil->next;
    while(cur != nil && cur->key != key){
        cur = cur->next;
    }
    return cur;
}

void deleteNode(Node *t){
    if(t == nil) return;
    t->prev->next = t->next;
    t->next->prev = t->prev;
    free(t);
}

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

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

void deleteKey(int key){
    deleteNode(listSearch(key));
}

void printList(){
    Node* cur = nil->next;
    int isf = 0;
    while(1){
        if(cur == nil) break;
        if(isf++ > 0) printf(" ");
        printf("%d", cur->key);
        cur = cur->next;
    }
    printf("\n");
}

int main(void){
    int n,key,i,size = 0;
    char com[20];
    scanf("%d",&n);
    init();
    for(i=0;i<n;i++){
        scanf("%s %d", com, &key);
        if(com[0] == 'i'){
            insert(key);
        }else if(com[0] == 'd'){
            deleteKey(key);
        }
    }
}

Compiler output:
main.c:7:5: error: unknown type name 'Node'
    7 |     Node *prev, *next;
      |     ^~~~
main.c:10:1: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   10 | Node *nil;
      | ^~~~
      | struct 
main.c: In function 'init':
main.c:13:12: error: 'Node' undeclared (first use in this function)
   13 |     nil = (Node*)malloc(sizeof(Node));
      |            ^~~~
main.c:13:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:17: error: expected expression before ')' token
   13 |     nil = (Node*)malloc(sizeof(Node));
      |                 ^
main.c:14:8: error: request for member 'next' in something not a structure or union
   14 |     nil->next = nil;
      |        ^~
main.c:15:8: error: request for member 'prev' in something not a structure or union
   15 |     nil->prev = nil;
      |        ^~
main.c: In function 'insert':
main.c:19:5: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   19 |     Node *x = (Node*)malloc(sizeof(Node));
      |     ^~~~
      |     struct 
main.c:19:16: error: 'Node' undeclared (first use in this function)
   19 |     Node *x = (Node*)malloc(sizeof(Node));
      |                ^~~~
main.c:19:21: error: expected expression before ')' token
   19 |     Node *x = (Node*)malloc(sizeof(Node));
      |                     ^
main.c:20:6: error: request for member 'key' in something not a structure or union
   20 |     x->key = key;
      |      ^~
main.c:21:6: error: request for member 'next' in something not a structure or union
   21 |     x->next = nil->next;
      |      ^~
main.c:21:18: error: request for member 'next' in something not a structure or union
   21 |     x->next = nil->next;
      |                  ^~
main.c:22:8: error: request for member 'next' in something not a structure or union
   22 |     nil->next->prev = x;
      |        ^~
main.c:23:8: error: request for member 'next' in something not a structure or union
   23 |     nil->next = x;
      |        ^~
main.c:24:6: error: request for member 'prev' in something not a structure or union
   24 |     x->prev = nil;
      |      ^~
main.c: At top level:
main.c:27:1: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   27 | Node* listSearch(int key){
      | ^~~~
      | struct 
main.c: In function 'listSearch':
main.c:28:5: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   28 |     Node* cur = nil->next;
      |     ^~~~
      |     struct 
main.c:28:20: error: request for member 'next' in something not a structure or union
   28 |     Node* cur = nil->next;
      |                    ^~
main.c:29:28: error: request for member 'key' in something not a structure or union
   29 |     while(cur != nil && cur->key != key){
      |                            ^~
main.c:30:18: error: request for member 'next' in something not a structure or union
   30 |         cur = cur->next;
      |                  ^~
main.c: At top level:
main.c:35:17: error: unknown type name 'Node'
   35 | void deleteNode(Node *t){
      |                 ^~~~
main.c: In function 'deleteFirst':
main.c:43:5: error: implicit declaration of function 'deleteNode' [-Wimplicit-function-declaration]
   43 |     deleteNode(nil->next);
      |     ^~~~~~~~~~
main.c:43:19: error: request for member 'next' in something not a structure or union
   43 |     deleteNode(nil->next);
      |                   ^~
main.c: In function 'deleteLast':
main.c:47:19: error: request for member 'prev' in something not a structure or union
   47 |     deleteNode(nil->prev);
      |                   ^~
main.c: In function 'printList':
main.c:55:5: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   55 |     Node* cur = nil->next;
      |     ^~~~
      |     struct 
main.c:55:20: error: request for member 'next' in something not a structure or union
   55 |     Node* cur = nil->next;
      |                    ^~
main.c:60:25: error: request for member 'key' in something not a structure or union
   60 |         printf("%d", cur->key);
      |                         ^~
main.c:61:18: error: request for member 'next' in something not a structure or union
   61 |         cur = cur->next;
      |                  ^~