criyle/codenet-compile-errors huggingface dataset:
Language: C

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

void enqueue(int);
void dequeue(void);

int Process_time[1000000];
char Process_name[100000][11];
int Process[100000];
int head=0,tail=1;

int main(){
  int i,j,time;
  int total_time = 0;
  int Process_number;


  scanf("%d %d",&Process_number,&time);
  
  for( tail = 0 ; tail < Process_number ; tail++){
    scanf("%s %d",Process_name[tail],&Process_time[tail]);
  }
  
  while(head != tail){
    
    Process_time[head] -= time; 
    
    if(Process_time[head] > 0) {
      total_time += time;
      dequeue( );
      if(head - 1 != -1)
      enqueue(head - 1);
      else enqueue( 99999);
    }
    else{
      total_time = total_time +(Process_time[head] +time);
      printf("%s %d head :%d  tail : %d \n",Process_name[head],total_time,head,tail);
      head++;
      //if(head == 100000 || tail == 100000) {printf("over head!!\n"); head = 0;}
	}  
    
	   }
  return 0;

}

void enqueue(int a){
  Process_time[tail] = Process_time[a];
  strcpy(Process_name[tail],Process_name[a]);
	 tail++;
	 // if(tail == 100000) {printf("enq over!! now head :  %d\n",head); tail = 0;
	   Process_time[tail] = Process_time[a];
	 strcpy(Process_name[tail],Process_name[a]);
	 }	 
}


void dequeue(void){
  head++; 
  //  if(head == 100000) {printf("deq over!! now tail : %d\n", tail ); head = 0;}
}

Compiler output:
main.c:56:1: error: expected identifier or '(' before '}' token
   56 | }
      | ^
Language: C

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

struct node{
  unsigned int key;
  struct node *next;
  struct node *prev;
};

typedef struct node * NodePointer;

NodePointer nil;

NodePointer listSearch(int key){
  NodePointer sol = nil->next;
  while(sol->key != key && sol != nil) sol = sol->next;
  return sol;
}

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

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

  }

  /*
  while(cur != nil->prev){
       printf("%d ", cur->key);
    cur = cur->next;
    }*/
 }

void deleteNode(NodePointer t){
  t->prev->next = t->next;
  t->next->prev = t->prev;
  free(t);
}

void deleteFirst(){
  NodePointer t = nil->next;
  if ( t == nil ) return;
  deleteNode(t);
 }

void deleteLast(){
  NodePointer t;
  t = nil->prev;
  if(t == nil) return;
  deleteNode(t);
 }

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


void insert(int key){
  NodePointer x;
  x = malloc(sizeof(struct node));
  x->key = key;
  x->next = nil->next;
  x->next->prev = x;
  nil->next = x;
  x->prev = nil;

}

NodePointer listSearch(int key);
void init();
void printList();
void deleteNode(NodePointer t);
void deleteFirst();
void deleteLast();


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, &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 {
	delete(key); 
	nd++; 
      }
      size--;
    }
  }

  printList();
  return 0;
}

Compiler output:
main.c:46:2: error: expected identifier or '(' before '}' token
   46 |  }
      |  ^
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define N 200000

struct node{
    int key;
    struct node *next;
    struct node *prev;
};
typedef struct node * NodePointer;
NodePointer nil, last;
int num = 0;
void init(){
    nil = malloc(sizeof(struct node));
    nil->next = nil;
    nil->prev = nil;

    last = malloc(sizeof(struct node));
    last->next = nil;
    last->prev = nil;
}

void insert(int key){
    NodePointer x;
    x = malloc(sizeof(struct node));
    x->key = key;
    x->next = nil->next;
    nil->next->prev = x;
    nil->next = x;
    num++;
}

void delete(int key){
    int i=0;
    NodePointer cur = nil;
    if(key == -1){
        nil->next = nil->next->next;
        nil->next->next->prev = nil;
    }
    else if(key == -2){
      if(last->prev == nil){
        while(cur->next->next != nil) cur = cur->next;
        cur->next = nil;
    }
    else{
        while(i < num){
	  if(cur->next->key == key){
	    cur->next = cur->next->next;
	    cur->next->next->prev = cur;
	    break;
	  }
	  cur = cur->next;
            i++;
        }
    }
    num--;
}

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

int main(){
    int i, n, key;
    char s[20];
    init();
    scanf("%d",&n);
    for(i = 0; i < n; i++){
        scanf("%s",s);
        if(s[0] == 'i'){
            scanf("%d",&key);
            insert(key);
        }
        else if(s[0] == 'd'){
            if(s[6] == 'F')
                delete(-1);
            else if(s[6] == 'L')
                delete(-2);
            else{
                scanf("%d",&key);
                delete(key);
            }
        }
    }
    printList();
    return 0;
}

Compiler output:
main.c: In function 'delete':
main.c:97:1: error: expected declaration or statement at end of input
   97 | }
      | ^
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define N 200000

struct node{
    int key;
    struct node *next;
    struct node *prev;
};
typedef struct node * NodePointer;
NodePointer nil;
int num = 0;
void init(){
    nil = malloc(sizeof(struct node));
    nil->next = nil;
    nil->prev = nil;
}

void insert(int key){
    NodePointer x;
    x = malloc(sizeof(struct node));
    x->key = key;
    x->next = nil->next;
    nil->next->prev = x;
    nil->next = x;
    num++;
}

void delete(int key){
    int i=0;
    NodePointer cur = nil;
    if(key == -1){
        nil->next = nil->next->next;
        nil->next->next->prev = nil;
    }
    else if(key == -2){
      if(last->prev == nil){
        while(cur->next->next != nil) cur = cur->next;
        cur->next = nil;
    }
    else{
        while(i < num){
	  if(cur->next->key == key){
	    cur->next = cur->next->next;
	    cur->next->next->prev = cur;
	    break;
	  }
	  cur = cur->next;
            i++;
        }
    }
    num--;
}

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

int main(){
    int i, n, key;
    char s[20];
    init();
    scanf("%d",&n);
    for(i = 0; i < n; i++){
        scanf("%s",s);
        if(s[0] == 'i'){
            scanf("%d",&key);
            insert(key);
        }
        else if(s[0] == 'd'){
            if(s[6] == 'F')
                delete(-1);
            else if(s[6] == 'L')
                delete(-2);
            else{
                scanf("%d",&key);
                delete(key);
            }
        }
    }
    printList();
    return 0;
}

Compiler output:
main.c: In function 'delete':
main.c:38:10: error: 'last' undeclared (first use in this function)
   38 |       if(last->prev == nil){
      |          ^~~~
main.c:38:10: note: each undeclared identifier is reported only once for each function it appears in
main.c:93:1: error: expected declaration or statement at end of input
   93 | }
      | ^
Language: C

#include <list>
#include <algorithm>
#include <iostream>
 
using namespace std;
 
int main(){
    int n;
    list<int> data;
    string command;
    int value;
    list<int>::iterator it;
 
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>command;
        if(command=="deleteFirst"){
            data.pop_front();
        }else if(command=="deleteLast"){
            data.pop_back();
        }else{
            cin>>value;
            if(command=="insert"){
                data.push_front(value);
            }else{
                it=find(data.begin(),data.end(),value);
                if(it!=data.end()){
                    data.erase(it);
                }
            }
        }
    }
    it=data.begin();
    while(it!=data.end()){
        cout<<*it++;
        if(it!=data.end()){
            cout<<" ";
        }
    }
    cout<<endl;
    return 0;
}

Compiler output:
main.c:1:10: fatal error: list: No such file or directory
    1 | #include <list>
      |          ^~~~~~
compilation terminated.
Language: C

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



struct node{
    int key;
    struct node *next;
    struct node *prev;
};
 
typedef struct node * NodePointer;
NodePointer finditem(int);
void listprint(void);
NodePointer make_1node(int,NodePointer);
void deleteFirst(void);
void deleteLast(void);
void deleteNode(NodePointer);
NodePointer head;
 

 
NodePointer finditem(int key){
  NodePointer x;
  x = head->next;
  while(x != head && x->key != key){
    x = x->next;
  }
  return x;
}
 
void insert(int key){
  NodePointer y;
  y = malloc(sizeof(struct node));
  y->key = key;
  y->next = head->next;
  head->next->prev = y;
  head->next = y;
  y->prev = head;
    
}
 
void listprint(){
  NodePointer cur = head->next;
  int count = 1;
  while(1){
    if ( count == head ) break;
    if ( count == 0)  printf(" ");
    printf("%d", cur->key);
    cur = cur->next;
    //fprintf(stderr,"now_isf : %d",isf);
    isf = 0;
  }
  printf("\n");
}
 
void deleteNode(NodePointer t){
  t->prev->next = t->next;
  t->next->prev = t->prev;
  free(t);
}
  
void deleteFirst(){
  NodePointer t = head->next;
  if ( t == head ) return;
  deleteNode(t);
}
  
void deleteLast(){
  NodePointer t = head->prev;
  if ( t == head ) return;
  deleteNode(t);
}
  
void delete(int key){
  NodePointer k;
  k=finditem(key);
  if(k == head) return;
    
  deleteNode(k);
    
}
void init(){
  head = malloc(sizeof(struct node));
  head->next = head;
  head->prev = head;
}

int main(void){
  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, &key);
    if ( com[0] == 'i' ) {insert(key); np++; size++;}
    //fprintf(stderr,"now_counting!?\n");
    else if ( com[0] == 'd' ) {
      //fprintf(stderr,"now_np : %d\n",np);
      if (strlen(com) > 6){
	if ( com[6] == 'F' ) deleteFirst();
	else if ( com[6] == 'L' ) deleteLast();
      } else {
	delete(key); nd++;
      }
      size--;
    }
  }
  
  listprint();
  return 0;
}

Compiler output:
main.c: In function 'listprint':
main.c:48:16: warning: comparison between pointer and integer
   48 |     if ( count == head ) break;
      |                ^~
main.c:53:5: error: 'isf' undeclared (first use in this function)
   53 |     isf = 0;
      |     ^~~
main.c:53:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

struct node{
  int key;
  struct node *next;
  struct node *prev;
};

typedef struct node *NodePointer;
NodePointer N;

void init(void); //???????????¢??°
void insert(int); //insert??¢??°
void delete(int); //delete??¢??°
void deleteFirst(void); //?????????????????????????????????
void deleteLast(void); //?????????????????????????????????
void deleteNode(NodePointer); //?????????????????????free??????
void Print(NodePointer); //?????????????????????

int main(void){

  int i,j,n,key;
  char a[12];
  struct node *NodePointer;
    
  scanf("%d",&n);
  init();
  for(i=0;i<n;i++){
    scanf("%s",a);
    if(strcmp(a,"insert") == 0){
      scanf("%d",&key);
      insert(key);
    }
    else if(strcmp(a,"delete") == 0){
      scanf("%d",&key);
      delete(key);
    }
    else if(strcmp(a,"deleteFirst") == 0){
      deleteFirst();
    }
    else if(strcmp(a,"deleteLast") == 0){
      deleteLast();
    }
  }
  Print(NodePointer);
  return 0;
}


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

void insert(int key){
  NodePointer p;
  p = malloc(sizeof(struct node));
  p->key = key;
  
  if(N->next == N){
    N->prev = p;
  }
  p->next = N->next;
  p->prev = N;
  N->next->prev = p;
  N->next = p;
}

void delete(int key){
  struct node *n;
  if(N->key == key){
    deleteFirst();
    return;
  }
  for(n=N->next;n!=N;n=n->next){

      if(n->key == key){
	deleteNode(n);
	return;
      }
    }
}

void deleteFirst(){
  NodePointer t = N->next;
  if ( t == N ) return;
  deleteNode(t);
}


void deleteLast(){
  NodePointer t = N -> prev;
  if(t == N) return;
  deleteNode(t);
}

void deleteNode(NodePointer t){
  if(t -> next == N){
    N->prev = t->prev;
    t->prev->next = N;
    free(t);
  }
  else if(t->prev == N){
    N->next = t->next;
    t->next->prev = N;
    free(t);
  }
  else{
    t->prev->next = t->next;
    t->next->prev = t->prev;
    free(t);
  }
}

Compiler output:
/usr/bin/ld: /tmp/cc4dPtR1.o: in function `main':
main.c:(.text+0x12c): undefined reference to `Print'
collect2: error: ld returned 1 exit status
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define N 200000

struct node{
    int key;
    struct node *next;
    struct node *prev;
};
typedef struct node * NodePointer;
NodePointer nil;
int num = 0;
void init(){
    nil = malloc(sizeof(struct node));
    nil->next = nil;
    nil->prev = nil;
}

void insert(int key){
    NodePointer x;
    x = malloc(sizeof(struct node));
    x->key = key;
    nil->next->prev = x;
    x->next = nil->next;
    nil->next = x;
    x->prev = nil;
    if(n == 0) nil->prev = x;
    num++;
}

void delete(int key){
    int i=0;
    NodePointer cur = nil;
    if(key == -1){
        nil->next = nil->next->next;
        nil->next->next->prev = nil;
    }
    else if(key == -2){
      nil->prev = nil->prev->prev;
      nil->prev->next = nil;
      /*
      while(cur->next->next != nil) cur = cur->next;
      cur->next = nil;
      */
    }
    else{
      while(i < num){
	if(cur->next->key == key){
	  if(cur->next->next == nil){
	    delete(-2);
	    return ;
	  }
	  cur->next = cur->next->next;
	  cur->next->prev = cur;
	  break;
	  }
	cur = cur->next;
	i++;
      }
    }
    num--;
}

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

int main(){
    int i, n, key;
    char s[20];
    init();
    scanf("%d",&n);
    for(i = 0; i < n; i++){
        scanf("%s",s);
        if(s[0] == 'i'){
            scanf("%d",&key);
            insert(key);
        }
        else if(s[0] == 'd'){
            if(s[6] == 'F')
                delete(-1);
            else if(s[6] == 'L')
                delete(-2);
            else{
                scanf("%d",&key);
                delete(key);
            }
        }
    }
    printList();
    free(nil);
    return 0;
}

Compiler output:
main.c: In function 'insert':
main.c:28:8: error: 'n' undeclared (first use in this function)
   28 |     if(n == 0) nil->prev = x;
      |        ^
main.c:28:8: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<cstio>
#include<list>
#include<algorithm>
using namespace std;

int main(){
  int q, x;
  char com[20];
  list<int> v;
  scanf("%d", &q);
  for(int i = 0 ; i < q ; i++){
    scanf("%s", com);
    if(com[0] == 'i'){
      scanf("%d", &x);
      v.push_front(x);
    }else if (com[6] == 'L'){
      v.pop_back();
    }else if (com[6] == 'F'){
      v.pop_front();
    }else if (com[0] == 'd'){
      scanf("%d", &x);
      for(list<int>::iterator it = v.begin(); it != v.end(); it++){
	if(*it == x){
	  v.erase(it);
	  break;
	}
      }
    }
  }
  int i = 0;
  for(list<int>::iterator it = v.begin(); it != v.end(); it++){
    if(i++) printf(" ");
    printf("%d", *it);
  }
  printf("\n");

  return 0;
}
	  
    

Compiler output:
main.c:1:9: fatal error: cstio: No such file or directory
    1 | #include<cstio>
      |         ^~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
 
struct node{
  unsigned int key;
  struct node *n;
  struct node *p;
};
 
typedef struct node * NodePointer;
 
NodePointer nil;
 
NodePointer listSearch(int key){
  /* your code */
}
 
void init(){
  nil = malloc(sizeof(struct node));
  nil->n = nil;
  nil->p = nil;
}
 
void printList(){
  NodePointer cu = nil->n;
  int is = 1;
  while(1){
    if ( cu == nil ) break;
    if ( is == 0)  printf(" ");
    printf("%d", cu->key);
    cu = cu->n;
    is = 0;
  }
  printf("\n");
}
 
void deleteNode(NodePointer t){
  /* your code */
  t->p->n = t->n;
  t->n->p = t->p;
 
}
 
void deleteFirst(){
  NodePointer t = nil->n;
  if ( t == nil ) return;
  deleteNode(t);
}
 
void deleteLast(){
  /* your code */
  deleteNode(d);
}
 
void delete(int key){
  /* your code */
  NodePointer d;
  d=listSearch(key);
  deleteNode(d);
}
 
 
void insert(int key){
  NodePointer x;
  x = malloc(sizeof(struct node));
  x->key = key;
 
  /* your code */
  x->n = nil->n;
  nil->n->p = x;
  nil->next = x
  x->p = nil
   
 
 
}
 
int main(){
  int key, n, i;
  int size = 0;
  char co[20];
  int n_p = 0, n_d = 0;
  scanf("%d", &n);
  init();
  for ( i = 0; i < n; i++ ){
    scanf("%s%d", co, &key);
    if ( co[0] == 'i' ) {insert(key); n_p++; size++;}
    else if ( co[0] == 'd' ) {
      if (strlen(co) > 6){
    if ( co[6] == 'F' ) deleteFirst();
    else if ( co[6] == 'L' ) deleteLast();
      } else {
    delete(key); n_d++;
      }
      size--;
    }
  }
 
  printList();
 
}

Compiler output:
main.c: In function 'deleteLast':
main.c:53:14: error: 'd' undeclared (first use in this function)
   53 |   deleteNode(d);
      |              ^
main.c:53:14: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'insert':
main.c:72:6: error: 'struct node' has no member named 'next'
   72 |   nil->next = x
      |      ^~
main.c:72:16: error: expected ';' before 'x'
   72 |   nil->next = x
      |                ^
      |                ;
   73 |   x->p = nil
      |   ~
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
  
struct node{
  unsigned int key;
  struct node *n;
  struct node *p;
};
  
typedef struct node * NodePointer;
  
NodePointer nil;
  
NodePointer listSearch(int key){
  /* your code */
}
  
void init(){
  nil = malloc(sizeof(struct node));
  nil->n = nil;
  nil->p = nil;
}
  
void printList(){
  NodePointer cu = nil->n;
  int is = 1;
  while(1){
    if ( cu == nil ) break;
    if ( is == 0)  printf(" ");
    printf("%d", cu->key);
    cu = cu->n;
    is = 0;
  }
  printf("\n");
}
  
void deleteNode(NodePointer t){
  /* your code */
  t->p->n = t->n;
  t->n->p = t->p;
  
}
  
void deleteFirst(){
  NodePointer t = nil->n;
  if ( t == nil ) return;
  deleteNode(t);
}
  
void deleteLast(){
  /* your code */
  deleteNode(d);
}
  
void delete(int key){
  /* your code */
  NodePointer d;
  d=listSearch(key);
  deleteNode(d);
}
  
  
void insert(int key){
  NodePointer x;
  x = malloc(sizeof(struct node));
  x->key = key;
  
  /* your code */
  x->n = nil->n;
  nil->n->p = x;
  nil->n = x
  x->p = nil
    
  
  
}
  
int main(){
  int key, n, i;
  int size = 0;
  char co[20];
  int n_p = 0, n_d = 0;
  scanf("%d", &n);
  init();
  for ( i = 0; i < n; i++ ){
    scanf("%s%d", co, &key);
    if ( co[0] == 'i' ) {insert(key); n_p++; size++;}
    else if ( co[0] == 'd' ) {
      if (strlen(co) > 6){
    if ( co[6] == 'F' ) deleteFirst();
    else if ( co[6] == 'L' ) deleteLast();
      } else {
    delete(key); n_d++;
      }
      size--;
    }
  }
  
  printList();
  return 0;
}

Compiler output:
main.c: In function 'deleteLast':
main.c:53:14: error: 'd' undeclared (first use in this function)
   53 |   deleteNode(d);
      |              ^
main.c:53:14: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'insert':
main.c:72:13: error: expected ';' before 'x'
   72 |   nil->n = x
      |             ^
      |             ;
   73 |   x->p = nil
      |   ~
Language: C

#include <stdio.h> // C++???????????????
#include <string.h> // c++???????????????
#include <math.h> // c++???????????????
#include <iostream>
#include <string>
#include <list>
#include <stack>
#include <queue>
#include <map>
#include <algorithm>
using namespace std;

typedef long long int lli;

list<lli> lis;

int main(void) {
	int n;
	list<lli>::iterator p;

	char a[20];
	lli x;
	scanf("%d", &n);

	while (n--) {
		scanf("%s", a);
		if (a[0] == 'i') {
			scanf("%lld", &x);
			lis.push_front(x);
		}
		else if (a[0] == 'd') {
			if (strlen(a) > 6 && a[6] == 'F') {
				lis.pop_front();
			}
			else if (strlen(a) > 8 && a[6] == 'L') {
				lis.pop_back();
			}
			else {
				scanf("%lld", &x);
				for (p = lis.begin(); p != lis.end(); p++) {
					if (*p == x) {
						lis.erase(p);
						break;
					}
				}
			}
		}
	}
	bool f=false;
	for (p = lis.begin(); p != lis.end(); p++) {
		if (f) printf(" ");
		printf("%lld", *p);
		f = true;
	}
	printf("\n");
	return 0;
}

Compiler output:
main.c:4:10: fatal error: iostream: No such file or directory
    4 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
int main(void)
{
	int a,n,i,j;
	int *m;
	scanf("%d",&n);
	m = new int[n];
	for(i=0;i<n;i++){
		m[i] = 0;
	}
	char x[15];
	for(i=0;i<n;i++){
		scanf("%s %d",x,&a);
		if(x[0] == 'i')
			m[i] = a;
		else if(m[6] == 'F'){
			m[i] = 0;
		}
		else if(m[6] == 'L'){
			m[0] = 0;
		}
		else{
			for(j=n-1;j>=0;j--){
				if(a == m[j]){
					m[j] = 0;
				}
			}
		}
	}
	for(i=n-1;i>=0;i--){
		if(m[i] != 0)
			printf("%d ",m[i]);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:13: error: 'new' undeclared (first use in this function)
    7 |         m = new int[n];
      |             ^~~
main.c:7:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:16: error: expected ';' before 'int'
    7 |         m = new int[n];
      |                ^~~~
      |                ;
Language: C

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

struct node{
  unsigned int key;
  struct node *next;
  struct node *prev;
};

typedef struct node * NodePointer;

NodePointer nil;

NodePointer listSearch(int key){
  NodePointer n;
  for(n = nil->next; n != nil && n->key != key; n = n->next);
  return n;
}

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

void printList(){
  NodePointer cur;
  int isf = 1;
  for(cur = nil->next;cur != nil; cur = cur->next){
    if(isf == 0) printf(" ");
    printf("%d", cur->key);
    isf = 0;
  }
  printf("\n");
}

void deleteNode(NodePointer t){
  NodePointer delnode;
  delnode = t;
  delnode->prev->next = delnode->next;
  delnode->next->prev = delnode->prev;
  free(delnode);
}

void deleteLast(){
  NodePointer t = nil->prev;
  if(t == nil) return;
  deleteNode(t);
}

void delete(int key){
  NodePointer t;
  t = listSearch(key);
  if(t == nil) return;
  deleteNode(t);
}
void insert(int key){
  NodePointer newnode;
  newnode = malloc(sizeof(struct node));
  newnode->key = key;
  newnode->next = nil->next;
  nil->next->prev = newnode;
  nil->next = newnode;
  newnode->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,&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{
        delete(key);
        nd++;
      }
      size--;
    }
  }

  printList();
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:84:27: error: implicit declaration of function 'deleteFirst'; did you mean 'deleteLast'? [-Wimplicit-function-declaration]
   84 |         if(com[6] == 'F') deleteFirst();
      |                           ^~~~~~~~~~~
      |                           deleteLast
Language: C

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

struct node{
  unsigned int key;
  struct node *next;
  struct node *prev;
};

typedef struct node * NodePointer;

NodePointer nil;

NodePointer listSearch(int key){
 NodePointer n;

  for (n = head; n->next != NULL; n = n->next ) {
    if (n->next->key == key) {
      return n;
    }
  }
  return NULL;
}

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

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

void deleteNode(NodePointer t){
 t->next->prev = t->prev;
 t->prev->next = t->next;
 free(t);
}

void deleteFirst(){
  NodePointer t = nil->next;
  if ( t == nil ) return;
  deleteNode(t);
}

void deleteLast(){
  NodePointer n;
  n = nil->prev;
  n->prev->next=nil;
  nil->prev=n->prev;
  free(n);
}

void delete(int key){
  NodePointer x;
  x = listSearch(key);
  if( x == nil ) return;
  deleteNode(x);
}


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

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, &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 {
	delete(key); nd++; 
      }
      size--;
    }
  }

  printList();
  return 0;
}

Compiler output:
main.c: In function 'listSearch':
main.c:18:12: error: 'head' undeclared (first use in this function)
   18 |   for (n = head; n->next != NULL; n = n->next ) {
      |            ^~~~
main.c:18:12: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'insert':
main.c:78:3: error: 'n' undeclared (first use in this function)
   78 |   n->prev = nil;
      |   ^
Language: C

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

struct node{
  unsigned int key;
  struct node *next;
  struct node *prev;
};

typedef struct node * NodePointer;

NodePointer nil;

NodePointer listSearch(int key){
  NodePointer n;
  n=nil->next;
  while(n!=nill && x->key!=key){
    x=x->next;
  }
  return x;
}

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

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

void deleteNode(NodePointer t){
 t->next->prev = t->prev;
 t->prev->next = t->next;
 free(t);
}

void deleteFirst(){
  NodePointer t = nil->next;
  if ( t == nil ) return;
  deleteNode(t);
}

void deleteLast(){
  NodePointer n;
  n = nil->prev;
  n->prev->next=nil;
  nil->prev=n->prev;
  free(n);
}

void delete(int key){
  NodePointer x;
  x = listSearch(key);
  if( x == nil ) return;
  deleteNode(x);
}


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

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, &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 {
	delete(key); nd++; 
      }
      size--;
    }
  }

  printList();
  return 0;
}

Compiler output:
main.c: In function 'listSearch':
main.c:18:12: error: 'nill' undeclared (first use in this function); did you mean 'nil'?
   18 |   while(n!=nill && x->key!=key){
      |            ^~~~
      |            nil
main.c:18:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:20: error: 'x' undeclared (first use in this function)
   18 |   while(n!=nill && x->key!=key){
      |                    ^
Language: C

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

struct node{
  unsigned int key;
  struct node *next;
  struct node *prev;
};

typedef struct node * NodePointer;

NodePointer nil;

NodePointer listSearch(int key){
  NodePointer n;
  n=nil->next;
  while(n!=nill && n->key!=key){
    n = n->next;
  }
  return x;
}

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

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

void deleteNode(NodePointer t){
 t->next->prev = t->prev;
 t->prev->next = t->next;
 free(t);
}

void deleteFirst(){
  NodePointer t = nil->next;
  if ( t == nil ) return;
  deleteNode(t);
}

void deleteLast(){
  NodePointer n;
  n = nil->prev;
  n->prev->next=nil;
  nil->prev=n->prev;
  free(n);
}

void delete(int key){
  NodePointer x;
  x = listSearch(key);
  if( x == nil ) return;
  deleteNode(x);
}


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

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, &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 {
	delete(key); nd++; 
      }
      size--;
    }
  }
  printList();
  return 0;
}

Compiler output:
main.c: In function 'listSearch':
main.c:18:12: error: 'nill' undeclared (first use in this function); did you mean 'nil'?
   18 |   while(n!=nill && n->key!=key){
      |            ^~~~
      |            nil
main.c:18:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:21:10: error: 'x' undeclared (first use in this function)
   21 |   return x;
      |          ^
Language: C

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

typedef struct{
  int val, flag;
}P;

void insert(int);
void delete(int);
void deleteFirst();
void deleteLast();

int head, top, j=0;
P Q[1000];

int main(){

  int i, n, b;
  char a[2000][20];

  scanf("%d",&n);

  head=0;

  for(i=0;i<n;i++){
    scanf("%s",a[i]);
    if(strcmp(a[i],"insert")==0){
      scanf("%d",&b);
      insert(b);
    }
    else if(strcmp(a[i],"delete")==0){
      scanf("%d",&b);
      //  printf("\nb %d\n",b);
      delete(b);	
    }
    else if(strcmp(a[i],"deleteLast")==0){
      deleteLast();	
    }
    else if(strcmp(a[i],"deleteFirst")==0){
      deleteFirst();	
    }
  }
  i=j-1;
  while(1){
    if(Q[i].flag!=1){
      printf("%d",Q[i].val);
      break;
    }
    i--;
  }
  i--;
  for(;i>0;i--){
    if(Q[i].flag!=1)printf(" %d",Q[i].val);
  }
  printf("\n");
  return 0;
}
void insert(int b){
  Q[j].val = b;
  Q[j].flag = 0;
  j++;
}
void delete(int b){
  int i;
  for(i=j-1;i>=0;i--){
    //  printf("\nj-1 %d\n",Q[j-1].val);

    if(Q[i].val==b && Q[i].flag!=1*/){
      Q[i].flag=1;
      //  printf("\n%d %d\n",Q[i].val,Q[i].flag);
      break;
    }
  }
}
void deleteFirst(){
  int i;

  for(i=j-1;i>=0;i--){
    if(Q[i].flag!=1){
      Q[i].flag=1;
      // printf("\n%d %d\n",Q[i].val,Q[i].flag);
      break;
    }
  }
}
void deleteLast(){
  int i;
  for(i=0;i<j;i++){
    if(Q[i].flag!=1){
      // printf("\n%d %d\n",Q[i].val,Q[i].flag);
      Q[i].flag=1;
      //  printf("\n%d %d\n",Q[i].val,Q[i].flag);
      break;
    }
  }
}

Compiler output:
main.c: In function 'delete':
main.c:68:36: error: expected expression before '/' token
   68 |     if(Q[i].val==b && Q[i].flag!=1*/){
      |                                    ^
Language: C

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

struct node{
  unsigned int key;
  struct node *next;
  struct node *pre;
};

typedef struct node * NodePointer;

NodePointer nil;

NodePointer listSearch(int key){
  NodePointer S = nil->next;
  while( S != nil && S->key != key ){
    S = S->next;
  }
  return S;
}

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

void printList(){
  NodePointer S = nil->next;
  int s = 1;
  while(1){
    if ( S == nil ) break;
    if ( s == 0)  printf(" ");
    printf("%d", S -> key);

    S = S -> next;
    s = 0;
  }
  printf("\n");
}

void deleteNode(NodePointer t){
  t -> pre ->next = t->next;
  t -> next ->pre = t->pre;
  
}

void deleteFirst(){
  NodePointer t = nil->next;
  if ( t == nil ) return;
  deleteNode(t);
}

void deleteLast(){
  NodePointer t = nil->prev;
  if ( t == nil ) return;
  deleteNode(t);
}

void delete(int key){
  NodePointer t = listSearch(key);
  if ( t == nil ) return;
  deleteNode(t);
}


void insert(int key){
  NodePointer a;
  a = malloc(sizeof(struct node));
  a -> key = key;
  a -> next = nil->next;
  nil -> next->pre = a;
  nil -> next = a;
  a -> pre = nil;
}

int main(){
  int key, n, i;
  int size = 0;
  char S[20];
  int p = 0, d = 0;
  scanf("%d", &n);
  init();
  for ( i = 0; i < n; i++ ){
    scanf("%s%d", S, &key);
    if(!( 0 <= key && key <= 2000000000)){printf("error") ;}
    if ( S[0] == 'i' ) {insert(key); p++; size++;}
    else if ( S[0] == 'd' ) {
      if (strlen(S) > 6){
	if ( S[6] == 'F' ) deleteFirst();
	else if ( S[6] == 'L' ) deleteLast();
      } else {
	delete(key); d++; 
      }
      size--;
    }
    if ( size > 1000000000 ) { printf("error"); }
  }

  
  if(!( p+d <= 2000000)){printf("error") ;}
  if(!( d <= 20)){printf("error") ;}
  printList();


  return 0;
}

Compiler output:
main.c: In function 'deleteLast':
main.c:56:24: error: 'struct node' has no member named 'prev'; did you mean 'pre'?
   56 |   NodePointer t = nil->prev;
      |                        ^~~~
      |                        pre
Language: C

#include<stdio.h>
#define MAX 2000000

void Insert(int);
void Delete(int);
void DeleteFirst(void);
void DeleteLast(void);

int S[MAX],count;
int main()
{
  int i,n,a1,a2;
  char order[12];

  scanf("%d",&n);
  for(i = 0;i < n;i++){
    S[i] = 0;
  }
  for(i = 0;i < n;i++){
    scanf("%s",order);
      if(order[0] == 'i'){
      scanf("%d",&a1);
      Insert(a1);
      count++;
    }
    else if(order[0] == 'd' && order[6] == 'L'){
      DeleteLast();
      }
    else if(order[0] == 'd' && order[6] == 'F'){
      DeleteFirst();
    }
    else {
      scanf("%d",&a2);
      Delete(a2);
    }
  }
  for(i = n;i >= 0;i--){
      if(S[i] != -1 && S[i] != 0)printf("%d ",S[i]);
  }

  printf("\n");
  return 0;
}

void Insert(int a)
{
  S[count] = a;
}
void Delete(int a)
{
  int i;
  for(i = 0;i < count;i++){
    if(S[i] == a) S[i] = -1;
  }
}

void DeleteFirst()
{
  int i;
  for(i = 0;i < count;i++){
    if(S[i] != -1){
      S[i] = -1;
      break;
    }
  }
}

void DeleteFirst()
{
  int i;
  for(i = 0;i < count;i++){
    if(S[i] != -1){
      S[i] = -1;
      break;
    }
  }
}

void DeleteLast()
{
  int i;
  for(i = count -1;i >= 0;){
    if(S[i] != -1){
      S[i] = -1;
      break;
    }
  }
}

Compiler output:
main.c:68:6: error: redefinition of 'DeleteFirst'
   68 | void DeleteFirst()
      |      ^~~~~~~~~~~
main.c:57:6: note: previous definition of 'DeleteFirst' with type 'void(void)'
   57 | void DeleteFirst()
      |      ^~~~~~~~~~~
Language: C

#include <stdio.h>

void insert(int);
void delete(int);
void deleteFirst(void);
void deleteLast(void);

int data[2000000];
int m=0;

int main(){

int n,i,x;
char com[10];

scanf("%d",&n);

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

for(i=0 ; i<m ; i++){
  printf("%d ",data[i]);
  if(i<m-1)printf(" ???);
 }

  printf("\n");

  return 0;

}


void insert(int x){
int i,temp;

for(i=m ; i>=0 ; i--){
  data[i+1]=data[i];
  if(i==0)data[i]=x;
  }
  m++;
}

void delete(int x){
  int i,j;
  for(i=0 ; i<m ; i++){
    if(data[i]==x){
      for(j=i ; j<m-1 ; j++){
        data[j]=data[j+1];
      }
      break;
    }
  }
  m--;
}

void deleteFirst(){
  int i;

  for(i=0 ; i<m-1 ; i++){
    data[i]=data[i+1];
  }

  m--;

}

void deleteLast(){

  data[m]=0;

  m--;
}

Compiler output:
main.c: In function 'main':
main.c:34:19: warning: missing terminating " character
   34 |   if(i<m-1)printf(" ???);
      |                   ^
main.c:34:22: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs]
   34 |   if(i<m-1)printf(" ???);
main.c:34:19: error: missing terminating " character
   34 |   if(i<m-1)printf(" ???);
      |                   ^~~~~~~
main.c:35:2: error: expected expression before '}' token
   35 |  }
      |  ^
main.c:34:19: error: expected ';' before '}' token
   34 |   if(i<m-1)printf(" ???);
      |                   ^
      |                   ;
   35 |  }
      |  ~
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct nd{ 
  int key;
  struct nd *next;
  struct nd *prev;
};
typedef struct nd * ndPointer;
ndPointer nil;
ndPointer listSearch(int key){
  ndPointer i;
  for(i=nil;i->next!=nil;i=i->next){
  if(i->next->key==key)return i->next;
  }
  return NULL;
} 
void init(){
  nil = malloc(siof(struct nd));
  nil->next = nil; 
  nil->prev = nil;
}
void printList(){ 
  ndPointer cur = nil->next;
  int isf = 1;
  while(1){
    if ( cur == nil ) break;
    if ( isf == 0) printf(" "); 
    printf("%d", cur->key);
    cur = cur->next; isf = 0; 
  } 
  printf("\n");
}
void deleteFirst(){ 
  ndPointer t = nil->next;
  if ( t == nil )return;
  deletend(t);
}
void deletend(ndPointer t){
  t->next->prev=t->prev;
  t->prev->next=t->next;
  free(t);
}
void deleteLast(){
  ndPointer i;
  i=nil->prev;
  deletend(i);
}
void delete(int key){
  ndPointer i; 
  i=listSearch(key);
  if(i!=NULL)deletend(i);
} 
void insert(int key){ 
  ndPointer x;
  x = malloc(siof(struct nd));
  x->key = key;
  x->next=nil->next;
  nil->next->prev=x;
  nil->next=x;
  x->prev=nil;
}
int main(){  
  char com[20]; 
  int np = 0, nd = 0,key, n, i,si = 0;
  scanf("%d", &n); 
  init();
  for ( i = 0; i < n; i++ ){
    scanf("%s%d", com, &key);
    if ( com[0] == 'i' ) {
      insert(key);
      np++;
      si++;
    } 
    else if ( com[0] == 'd' ) {
      if (strlen(com) > 6){
    if ( com[6] == 'F' ) deleteFirst();
    else if ( com[6] == 'L' ) deleteLast();
      }
      else { delete(key); nd++; } si--; }
  }
  printList(); 
  return 0;
}

Compiler output:
main.c: In function 'init':
main.c:19:16: error: implicit declaration of function 'siof' [-Wimplicit-function-declaration]
   19 |   nil = malloc(siof(struct nd));
      |                ^~~~
main.c:19:21: error: expected expression before 'struct'
   19 |   nil = malloc(siof(struct nd));
      |                     ^~~~~~
main.c: In function 'deleteFirst':
main.c:37:3: error: implicit declaration of function 'deletend' [-Wimplicit-function-declaration]
   37 |   deletend(t);
      |   ^~~~~~~~
main.c: At top level:
main.c:39:6: warning: conflicting types for 'deletend'; have 'void(struct nd *)'
   39 | void deletend(ndPointer t){
      |      ^~~~~~~~
main.c:37:3: note: previous implicit declaration of 'deletend' with type 'void(struct nd *)'
   37 |   deletend(t);
      |   ^~~~~~~~
main.c: In function 'insert':
main.c:56:19: error: expected expression before 'struct'
   56 |   x = malloc(siof(struct nd));
      |                   ^~~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
 
struct node{
  int key;
  struct node *next;
  struct node *prev;
};
 
typedef struct node * Node;
Node nil;
 
 
Node search(int key){
  Node x;
    
  x = nil->next;
    
  while(x != nil && x->key != key){
    x = x->next;
  }
  return x;
    
}
  
void init(){
  nil = malloc(sizeof(struct node));
  nil->next = nil;
  nil->prev = nil;
}
  
void printList(){
  Node cur = nil->next;
  int isf = 1;
  while(1){
    if ( cur == nil ) break;
    if ( isf == 0)  printf(" ");
    printf("%d", cur->key);
    cur = cur->next;
    isf = 0;
  }
  printf("\n");
}
  
void deleteNode(Node t){
  t->prev->next = t->next;
  t->next->prev = t->prev;
  
}
  
void deleteFirst(){
  deleteNode(nil->next);
}
  
void deleteLast(){
  deleteNode(nil->prev);
}
  
void delete(int key){
  Node x;
  
  if((x = search(key))!=NULL){
  
    deleteNode(x);
  }
   
}
  
  
void insert(int key){
  Node x;
  x = malloc(sizeof(struct 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, np = 0, nd = 0;
  char order[20];
  
  scanf("%d", &n);

  init();

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

Compiler output:
main.c: In function 'main':
main.c:100:10: error: 'com' undeclared (first use in this function)
  100 |     if ( com[6] == 'F' )
      |          ^~~
main.c:100:10: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
 
struct node{
  int key;
  struct node *next;
  struct node *prev;
};
 
typedef struct node * Node;
Node nil;
 
 
Node search(int key){
  Node x;
    
  x = nil->next;
    
  while(x != nil && x->key != key){
    x = x->next;
  }
  return x;
    
}
  
void init(){
  nil = malloc(sizeof(struct node));
  nil->next = nil;
  nil->prev = nil;
}
  
void printList(){
  Node cur = nil->next;
  int isf = 1;
  while(1){
    if ( cur == nil ) break;
    if ( isf == 0)  printf(" ");
    printf("%d", cur->key);
    cur = cur->next;
    isf = 0;
  }
  printf("\n");
}
  
void deleteNode(Node t){
  if ( t == nil ) return;
  t->prev->next = t->next;
  t->next->prev = t->prev;
  
}
  
void deleteFirst(){
  deleteNode(nil->next);
}
  
void deleteLast(){
  deleteNode(nil->prev);
}
  
void delete(int key){
  Node x;
  
  if((x = search(key))!=NULL){
  
    deleteNode(x);
  }
   
}
  
  
void insert(int key){
  Node x;
  x = malloc(sizeof(struct 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, np = 0, nd = 0;
  char order[20];
  
  scanf("%d", &n);

  init();

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

Compiler output:
main.c: In function 'main':
main.c:101:10: error: 'com' undeclared (first use in this function)
  101 |     if ( com[6] == 'F' )
      |          ^~~
main.c:101:10: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

#define N 1000000

typedef struct node{
  int nil;
  int key;
}Node;
 
int search(char *, int);
void insert(char *, int);
void delete(char *, int);

int main(){

  int n, i, a;
  char com[N];

  scanf("%d", &n);

  for(i=0; i<n; i++){
    scanf("%s", com);
    a = search(com[i], com[i].k);
    insert(com[i], com[i].k);
    delete(com[i], com[i].k);
  }

  return 0;
}

int search(char *L, int k){

  int x;

  x = L.nil.next;

  while((x != L.nil) && (x.key != k)){
    x = x.next;
  }

  return x;

}

Compiler output:
main.c: In function 'main':
main.c:23:30: error: request for member 'k' in something not a structure or union
   23 |     a = search(com[i], com[i].k);
      |                              ^
main.c:23:19: error: passing argument 1 of 'search' makes pointer from integer without a cast [-Wint-conversion]
   23 |     a = search(com[i], com[i].k);
      |                ~~~^~~
      |                   |
      |                   char
main.c:10:12: note: expected 'char *' but argument is of type 'char'
   10 | int search(char *, int);
      |            ^~~~~~
main.c:24:26: error: request for member 'k' in something not a structure or union
   24 |     insert(com[i], com[i].k);
      |                          ^
main.c:24:15: error: passing argument 1 of 'insert' makes pointer from integer without a cast [-Wint-conversion]
   24 |     insert(com[i], com[i].k);
      |            ~~~^~~
      |               |
      |               char
main.c:11:13: note: expected 'char *' but argument is of type 'char'
   11 | void insert(char *, int);
      |             ^~~~~~
main.c:25:26: error: request for member 'k' in something not a structure or union
   25 |     delete(com[i], com[i].k);
      |                          ^
main.c:25:15: error: passing argument 1 of 'delete' makes pointer from integer without a cast [-Wint-conversion]
   25 |     delete(com[i], com[i].k);
      |            ~~~^~~
      |               |
      |               char
main.c:12:13: note: expected 'char *' but argument is of type 'char'
   12 | void delete(char *, int);
      |             ^~~~~~
main.c: In function 'search':
main.c:35:8: error: request for member 'nil' in something not a structure or union
   35 |   x = L.nil.next;
      |        ^
main.c:37:16: error: request for member 'nil' in something not a structure or union
   37 |   while((x != L.nil) && (x.key != k)){
      |                ^
main.c:37:27: error: request for member 'key' in something not a structure or union
   37 |   while((x != L.nil) && (x.key != k)){
      |                           ^
main.c:38:10: error: request for member 'next' in something not a structure or union
   38 |     x = x.next;
      |          ^