Language: C

#include<stdio.h>
#define SENTINEL 10000;

void Merge(int,int,int);
void Merge-Sort(int,int,int);
int count = 0;
int S[SENTINEL]
main(){
int left,right,n;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&S[i]);

left = 0;
right = n;

Merge-Sort(S[i], left, right);
}
return 0;
}
Merge(A, left, mid, right){
int n1,n2,i,j,k;  
n1 = mid - left;
  n2 = right - mid;
  int array L[n1], R[n2];
  for (i = 0;i< n1;i++){
      L[i] = A[left + i];
}
  for (i = 0;i < n2;i++){
      R[i] = A[mid + i];
}
  L[n1] = SENTINEL
  R[n2] = SENTINEL
  i = 0;
  j = 0;
  for (k = left;k < right;k++){
    if (L[i] <= R[j]){
count++; 
       A[k] = L[i];
        i = i + 1;
}    else {count++;
        A[k] = R[j];
        j = j + 1;
}
return 0;
}

Merge-Sort(A, left, right){
  if (left+1 < right){
      mid = (left + right)/2;
       Merge-Sort(A, left, mid);
       Merge-Sort(A, mid, right);
       Merge(A, left, mid, right);
}
return ;
}

Compiler output:
main.c:5:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '-' token
    5 | void Merge-Sort(int,int,int);
      |           ^
main.c:2:23: error: expected ']' before ';' token
    2 | #define SENTINEL 10000;
      |                       ^
main.c:7:7: note: in expansion of macro 'SENTINEL'
    7 | int S[SENTINEL]
      |       ^~~~~~~~
main.c:21:1: error: return type defaults to 'int' [-Wimplicit-int]
   21 | Merge(A, left, mid, right){
      | ^~~~~
main.c:21:1: warning: conflicting types for 'Merge'
main.c:4:6: note: previous declaration of 'Merge' with type 'void(int,  int,  int)'
    4 | void Merge(int,int,int);
      |      ^~~~~
main.c: In function 'Merge':
main.c:21:1: error: type of 'A' defaults to 'int' [-Wimplicit-int]
   21 | Merge(A, left, mid, right){
      | ^~~~~
main.c:21:1: error: type of 'left' defaults to 'int' [-Wimplicit-int]
main.c:21:1: error: type of 'mid' defaults to 'int' [-Wimplicit-int]
main.c:21:1: error: type of 'right' defaults to 'int' [-Wimplicit-int]
main.c:25:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'L'
   25 |   int array L[n1], R[n2];
      |             ^
main.c:25:13: error: 'L' undeclared (first use in this function)
main.c:25:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:20: error: 'R' undeclared (first use in this function)
   25 |   int array L[n1], R[n2];
      |                    ^
main.c:27:15: error: subscripted value is neither array nor pointer nor vector
   27 |       L[i] = A[left + i];
      |               ^
main.c:30:15: error: subscripted value is neither array nor pointer nor vector
   30 |       R[i] = A[mid + i];
      |               ^
main.c:39:9: error: subscripted value is neither array nor pointer nor vector
   39 |        A[k] = L[i];
      |         ^
main.c:42:10: error: subscripted value is neither array nor pointer nor vector
   42 |         A[k] = R[j];
      |          ^
main.c:45:8: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   45 | return 0;
      |        ^
main.c:21:1: note: declared here
   21 | Merge(A, left, mid, right){
      | ^~~~~
main.c:48:7: error: implicit declaration of function 'Sort' [-Wimplicit-function-declaration]
   48 | Merge-Sort(A, left, right){
      |       ^~~~
main.c:48:27: error: expected ';' before '{' token
   48 | Merge-Sort(A, left, right){
      |                           ^
      |                           ;
main.c:56:1: error: expected declaration or statement at end of input
   56 | }
      | ^