Language: C

#include<stdio.h>
#define MAX 100000
typedef struct{
    char name[100];
    int time;
} queue;
 
void enqu(roll);
roll dequ(void);
 
int head=0,tail=0;
queue C[MAX];
 
    main(){
    int n,m,i,sum=0;
    queue D[MAX];

    scanf("%d%d",&n,&m);
        for(i=0;i<n;i++){
            scanf("%s%d",D.name,&D.time);
            enqueue(D);
        }
        while(1){
            if(head == tail) break;
            if(D[head].time > m){
                m = dequ();
                D.time -= C;
                enqu(D);
                sum += m;
            }
            else{
                D = dequeue();
                printf("%s %d\n",D.name,D.time+sum);
                sum += D.time;
            }
        }
return 0;
}
 
void enqu(queue p){
C[tail] = p;
if(tail+1 == MAX) tail = 0;
else tail++;
}
 
queue dequ(){
    queue x;
    x = C[head];
 
    if(head+1 == MAX) head = 0;
    else head++;
    return x;
}

Compiler output:
main.c:8:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
    8 | void enqu(roll);
      | ^~~~
main.c:9:1: error: unknown type name 'roll'
    9 | roll dequ(void);
      | ^~~~
main.c:14:5: error: return type defaults to 'int' [-Wimplicit-int]
   14 |     main(){
      |     ^~~~
main.c: In function 'main':
main.c:20:27: error: '(queue *)&D' is a pointer; did you mean to use '->'?
   20 |             scanf("%s%d",D.name,&D.time);
      |                           ^
      |                           ->
main.c:20:35: error: '(queue *)&D' is a pointer; did you mean to use '->'?
   20 |             scanf("%s%d",D.name,&D.time);
      |                                   ^
      |                                   ->
main.c:21:13: error: implicit declaration of function 'enqueue'; did you mean 'enqu'? [-Wimplicit-function-declaration]
   21 |             enqueue(D);
      |             ^~~~~~~
      |             enqu
main.c:27:18: error: '(queue *)&D' is a pointer; did you mean to use '->'?
   27 |                 D.time -= C;
      |                  ^
      |                  ->
main.c:32:21: error: implicit declaration of function 'dequeue'; did you mean 'dequ'? [-Wimplicit-function-declaration]
   32 |                 D = dequeue();
      |                     ^~~~~~~
      |                     dequ
main.c:32:19: error: assignment to expression with array type
   32 |                 D = dequeue();
      |                   ^
main.c:33:35: error: '(queue *)&D' is a pointer; did you mean to use '->'?
   33 |                 printf("%s %d\n",D.name,D.time+sum);
      |                                   ^
      |                                   ->
main.c:33:42: error: '(queue *)&D' is a pointer; did you mean to use '->'?
   33 |                 printf("%s %d\n",D.name,D.time+sum);
      |                                          ^
      |                                          ->
main.c:34:25: error: '(queue *)&D' is a pointer; did you mean to use '->'?
   34 |                 sum += D.time;
      |                         ^
      |                         ->
main.c: At top level:
main.c:46:7: error: conflicting types for 'dequ'; have 'queue()'
   46 | queue dequ(){
      |       ^~~~
main.c:9:6: note: previous declaration of 'dequ' with type 'int(void)'
    9 | roll dequ(void);
      |      ^~~~