Language: C

#include <stdio.h>
#define N 1000

int lcs(string X,string Y)
  int m,n,i,j,c,maxl,[N+1][N+1];
  m=X.length();
  n=Y.length();
  maxl=0;
  X=' '+X;
  Y=' '+Y;
  for(i=0;i<=m;i++){
    c[i][0]=0;
  }
  for(j=1;j<=n;j++){
    c[0][j]=0;
  }
  for(i=1;i<m;i++){
    for(j=0;j<n;j++){
      if(X[i]==Y[j]){
        c[i][j]=c[i-1][j-1]+1;
      }
      else if(c[i-1][j]>=c[i][j-1]){
        c[i][j]=c[i-1][j];
      }
      else {
        c[i][j]=c[i][j-1];
    }
    
  }
}

int main(void)
{
  string x,y;
  int i,n;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&x);
    scanf("%d",&y);
  }
  printf("%d\n",lcs(x,y));

  return 0;
}

Compiler output:
main.c:4:9: error: unknown type name 'string'; did you mean 'stdin'?
    4 | int lcs(string X,string Y)
      |         ^~~~~~
      |         stdin
main.c:4:18: error: unknown type name 'string'; did you mean 'stdin'?
    4 | int lcs(string X,string Y)
      |                  ^~~~~~
      |                  stdin
main.c:6:3: warning: data definition has no type or storage class
    6 |   m=X.length();
      |   ^
main.c:6:3: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int]
main.c:6:5: error: 'X' undeclared here (not in a function)
    6 |   m=X.length();
      |     ^
main.c:7:3: warning: data definition has no type or storage class
    7 |   n=Y.length();
      |   ^
main.c:7:3: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:7:5: error: 'Y' undeclared here (not in a function)
    7 |   n=Y.length();
      |     ^
main.c:8:3: warning: data definition has no type or storage class
    8 |   maxl=0;
      |   ^~~~
main.c:8:3: error: type defaults to 'int' in declaration of 'maxl' [-Wimplicit-int]
main.c:9:3: warning: data definition has no type or storage class
    9 |   X=' '+X;
      |   ^
main.c:9:3: error: type defaults to 'int' in declaration of 'X' [-Wimplicit-int]
main.c:9:5: error: initializer element is not constant
    9 |   X=' '+X;
      |     ^~~
main.c:10:3: warning: data definition has no type or storage class
   10 |   Y=' '+Y;
      |   ^
main.c:10:3: error: type defaults to 'int' in declaration of 'Y' [-Wimplicit-int]
main.c:10:5: error: initializer element is not constant
   10 |   Y=' '+Y;
      |     ^~~
main.c:11:3: error: expected identifier or '(' before 'for'
   11 |   for(i=0;i<=m;i++){
      |   ^~~
main.c:11:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token
   11 |   for(i=0;i<=m;i++){
      |            ^~
main.c:11:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   11 |   for(i=0;i<=m;i++){
      |                 ^~
main.c:14:3: error: expected identifier or '(' before 'for'
   14 |   for(j=1;j<=n;j++){
      |   ^~~
main.c:14:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token
   14 |   for(j=1;j<=n;j++){
      |            ^~
main.c:14:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   14 |   for(j=1;j<=n;j++){
      |                 ^~
main.c:17:3: error: expected identifier or '(' before 'for'
   17 |   for(i=1;i<m;i++){
      |   ^~~
main.c:17:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   17 |   for(i=1;i<m;i++){
      |            ^
main.c:17:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   17 |   for(i=1;i<m;i++){
      |                ^~
main.c: In function 'main':
main.c:34:3: error: unknown type name 'string'; did you mean 'stdin'?
   34 |   string x,y;
      |   ^~~~~~
      |   stdin
main.c:41:17: error: implicit declaration of function 'lcs' [-Wimplicit-function-declaration]
   41 |   printf("%d\n",lcs(x,y));
      |                 ^~~