Language: C

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

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

Node *nil;

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

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

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

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 deleteKey(int key){
  deleteNode(listSearch(key));
}

int main(){
  int key,n,i,size=0,np=0,nd=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);
      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:7:3: error: unknown type name 'Node'
    7 |   Node *next,*prev;
      |   ^~~~
main.c: In function 'init':
main.c:14:15: error: assignment to 'int *' from incompatible pointer type 'Node *' [-Wincompatible-pointer-types]
   14 |   nil -> next = nil;
      |               ^
main.c:15:15: error: assignment to 'int *' from incompatible pointer type 'Node *' [-Wincompatible-pointer-types]
   15 |   nil -> prev = nil;
      |               ^
main.c: In function 'printList':
main.c:19:15: error: initialization of 'Node *' from incompatible pointer type 'int *' [-Wincompatible-pointer-types]
   19 |   Node *cur = nil -> next;
      |               ^~~
main.c:25:9: error: assignment to 'Node *' from incompatible pointer type 'int *' [-Wincompatible-pointer-types]
   25 |     cur = cur -> next;
      |         ^
main.c: In function 'listSearch':
main.c:31:15: error: initialization of 'Node *' from incompatible pointer type 'int *' [-Wincompatible-pointer-types]
   31 |   Node *cur = nil -> next;
      |               ^~~
main.c:32:46: error: assignment to 'Node *' from incompatible pointer type 'int *' [-Wincompatible-pointer-types]
   32 |   while(cur != nil && cur -> key != key) cur = cur -> next;
      |                                              ^
main.c: In function 'insert':
main.c:37:14: error: 'node' undeclared (first use in this function); did you mean 'Node'?
   37 |   Node *x = (node*)malloc(sizeof(Node));
      |              ^~~~
      |              Node
main.c:37:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:37:19: error: expected expression before ')' token
   37 |   Node *x = (node*)malloc(sizeof(Node));
      |                   ^
main.c:40:15: error: request for member 'prev' in something not a structure or union
   40 |   nil -> next -> prev = x;
      |               ^~
main.c:41:15: error: assignment to 'int *' from incompatible pointer type 'Node *' [-Wincompatible-pointer-types]
   41 |   nil -> next = x;
      |               ^
main.c:42:13: error: assignment to 'int *' from incompatible pointer type 'Node *' [-Wincompatible-pointer-types]
   42 |   x -> prev = nil;
      |             ^
main.c: In function 'deleteNode':
main.c:47:13: error: request for member 'next' in something not a structure or union
   47 |   t -> prev -> next = t -> next;
      |             ^~
main.c:48:13: error: request for member 'prev' in something not a structure or union
   48 |   t -> next -> prev = t -> prev;
      |             ^~
main.c: In function 'deleteFirst':
main.c:53:18: error: passing argument 1 of 'deleteNode' from incompatible pointer type [-Wincompatible-pointer-types]
   53 |   deleteNode(nil -> next);
      |              ~~~~^~~~~~~
      |                  |
      |                  int *
main.c:45:23: note: expected 'Node *' but argument is of type 'int *'
   45 | void deleteNode(Node *t){
      |                 ~~~~~~^
main.c: In function 'main':
main.c:76:32: error: implicit declaration of function 'deleteLast'; did you mean 'deleteFirst'? [-Wimplicit-function-declaration]
   76 |         else if(com[6] == 'L') deleteLast();
      |                                ^~~~~~~~~~
      |                                deleteFirst