Language: C

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

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

Node *nil;

void init(){
  nil = (Node *)malloc(sizeof(Node));
  nil->prev = nil;
  nil->next = 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));
}

int main(void){
  int n, i, a, b = 0;
  char s[100];
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%s",s);
    if(s[0] == 'd'){
      if(s[6] == 'F') deleteFirst();
      else if(s[6] == 'L') deleteLast();
      else {
        scanf("%d",&a);
        deleteKey(a);
      }
    }
    else {
      scanf("%d",&a);
      insert(a);
      b++;
    }
  }
  printf("%d",nil->next->key);
  Node *c = nil->next;
  for(i=0;i<b*2-n-1;i++){
    c = c->next;
    printf(" %d",c->key);
  }
  printf("\n");
  return 0;
}

Compiler output:
main.c:6:3: error: unknown type name 'Node'
    6 |   Node *prev, *next;
      |   ^~~~
main.c: In function 'init':
main.c:13:13: error: assignment to 'int *' from incompatible pointer type 'Node *' [-Wincompatible-pointer-types]
   13 |   nil->prev = nil;
      |             ^
main.c:14:13: error: assignment to 'int *' from incompatible pointer type 'Node *' [-Wincompatible-pointer-types]
   14 |   nil->next = nil;
      |             ^
main.c: In function 'insert':
main.c:21:14: error: request for member 'prev' in something not a structure or union
   21 |   (nil->next)->prev = x;
      |              ^~
main.c:22:13: error: assignment to 'int *' from incompatible pointer type 'Node *' [-Wincompatible-pointer-types]
   22 |   nil->next = x;
      |             ^
main.c:23:11: error: assignment to 'int *' from incompatible pointer type 'Node *' [-Wincompatible-pointer-types]
   23 |   x->prev = nil;
      |           ^
main.c: In function 'listSearch':
main.c:27:15: error: initialization of 'Node *' from incompatible pointer type 'int *' [-Wincompatible-pointer-types]
   27 |   Node *cur = nil->next;
      |               ^~~
main.c:29:9: error: assignment to 'Node *' from incompatible pointer type 'int *' [-Wincompatible-pointer-types]
   29 |     cur = cur->next;
      |         ^
main.c: In function 'deleteNode':
main.c:36:11: error: request for member 'next' in something not a structure or union
   36 |   (t->prev->next) = t->next;
      |           ^~
main.c:37:11: error: request for member 'prev' in something not a structure or union
   37 |   (t->next->prev) = t->prev;
      |           ^~
main.c: In function 'deleteFirst':
main.c:42:17: error: passing argument 1 of 'deleteNode' from incompatible pointer type [-Wincompatible-pointer-types]
   42 |   deleteNode(nil->next);
      |              ~~~^~~~~~
      |                 |
      |                 int *
main.c:34:23: note: expected 'Node *' but argument is of type 'int *'
   34 | void deleteNode(Node *t){
      |                 ~~~~~~^
main.c: In function 'deleteLast':
main.c:46:17: error: passing argument 1 of 'deleteNode' from incompatible pointer type [-Wincompatible-pointer-types]
   46 |   deleteNode(nil->prev);
      |              ~~~^~~~~~
      |                 |
      |                 int *
main.c:34:23: note: expected 'Node *' but argument is of type 'int *'
   34 | void deleteNode(Node *t){
      |                 ~~~~~~^
main.c: In function 'main':
main.c:73:24: error: request for member 'key' in something not a structure or union
   73 |   printf("%d",nil->next->key);
      |                        ^~
main.c:74:13: error: initialization of 'Node *' from incompatible pointer type 'int *' [-Wincompatible-pointer-types]
   74 |   Node *c = nil->next;
      |             ^~~
main.c:76:7: error: assignment to 'Node *' from incompatible pointer type 'int *' [-Wincompatible-pointer-types]
   76 |     c = c->next;
      |       ^