Language: C

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

Node nil;

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

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

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");
}

void deleteNode(Node *t){
  if(t==nil) return 1;
    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 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;
}

int main(){
  int key,n,i;
  int size=0;
  char com[20];
  int np=0,nd=0;
  scanf("%d",&n);
  init();
  for(i=0;i<n;i++){
    scanf("%s""%d",&com[i],&key);
    if(com[0]=='i'){
      insert(key);
      np++;
      size++;
    }
    else if(com[0]=='d'){
      if(strlen(com)>6){
	if(com[6]=='F') deleteFirst();
	else if(com[6]=='L') deleteLast();
      }
      else {
	deletekey(key);
	nd++;
      }
      size--;
    }
  }
  printList();
  return 0;
}

Compiler output:
main.c:6:3: error: unknown type name 'Node'
    6 |   Node *next,*prev;
      |   ^~~~
main.c:9:1: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
    9 | Node nil;
      | ^~~~
      | struct 
main.c:11:1: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   11 | Node* listSearch(int key){
      | ^~~~
      | struct 
main.c: In function 'listSearch':
main.c:12:3: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   12 |   Node *cur=nil->next;
      |   ^~~~
      |   struct 
main.c:12:16: error: invalid type argument of '->' (have 'int')
   12 |   Node *cur=nil->next;
      |                ^~
main.c:13:12: warning: comparison between pointer and integer
   13 |   while(cur!=nil && cur->key!=key){
      |            ^~
main.c:13:24: error: request for member 'key' in something not a structure or union
   13 |   while(cur!=nil && cur->key!=key){
      |                        ^~
main.c:14:12: error: request for member 'next' in something not a structure or union
   14 |     cur=cur->next;
      |            ^~
main.c: In function 'init':
main.c:20:8: error: 'Node' undeclared (first use in this function)
   20 |   nil=(Node *)malloc(sizeof(Node));
      |        ^~~~
main.c:20:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:20:14: error: expected expression before ')' token
   20 |   nil=(Node *)malloc(sizeof(Node));
      |              ^
main.c:21:6: error: invalid type argument of '->' (have 'int')
   21 |   nil->next=nil;
      |      ^~
main.c:22:6: error: invalid type argument of '->' (have 'int')
   22 |   nil->prev=nil;
      |      ^~
main.c: In function 'printList':
main.c:26:3: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   26 |   Node *cur=nil->next;
      |   ^~~~
      |   struct 
main.c:26:16: error: invalid type argument of '->' (have 'int')
   26 |   Node *cur=nil->next;
      |                ^~
main.c:29:11: warning: comparison between pointer and integer
   29 |     if(cur==nil)break;
      |           ^~
main.c:31:20: error: request for member 'key' in something not a structure or union
   31 |     printf("%d",cur->key);
      |                    ^~
main.c:32:12: error: request for member 'next' in something not a structure or union
   32 |     cur=cur->next;
      |            ^~
main.c: At top level:
main.c:37:17: error: unknown type name 'Node'
   37 | void deleteNode(Node *t){
      |                 ^~~~
main.c: In function 'deleteFirst':
main.c:45:3: error: implicit declaration of function 'deleteNode' [-Wimplicit-function-declaration]
   45 |   deleteNode(nil->next);
      |   ^~~~~~~~~~
main.c:45:17: error: invalid type argument of '->' (have 'int')
   45 |   deleteNode(nil->next);
      |                 ^~
main.c: In function 'deleteLast':
main.c:49:17: error: invalid type argument of '->' (have 'int')
   49 |   deleteNode(nil->prev);
      |                 ^~
main.c: In function 'insert':
main.c:57:3: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   57 |   Node *x=(Node *)malloc(sizeof(Node));
      |   ^~~~
      |   struct 
main.c:57:12: error: 'Node' undeclared (first use in this function)
   57 |   Node *x=(Node *)malloc(sizeof(Node));
      |            ^~~~
main.c:57:18: error: expected expression before ')' token
   57 |   Node *x=(Node *)malloc(sizeof(Node));
      |                  ^
main.c:58:4: error: request for member 'key' in something not a structure or union
   58 |   x->key=key;
      |    ^~
main.c:59:4: error: request for member 'next' in something not a structure or union
   59 |   x->next=nil->next;
      |    ^~
main.c:59:14: error: invalid type argument of '->' (have 'int')
   59 |   x->next=nil->next;
      |              ^~
main.c:60:6: error: invalid type argument of '->' (have 'int')
   60 |   nil->next->prev=x;
      |      ^~
main.c:61:6: error: invalid type argument of '->' (have 'int')
   61 |   nil->next=x;
      |      ^~
main.c:62:4: error: request for member 'prev' in something not a structure or union
   62 |   x->prev=nil;
      |    ^~