Language: C

#include <stdio.h>

int c[1001][1001];

int length(const char *s[])
{
  int len;
  len=0;
  while(*s[len]++){
    len++;
  }
  return len;
}

int lcs(char X[],char Y[],int m,int n){

  int i,j,max1;
  max1=0;
  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=1;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];
      }
    if(max1>c[i][j]){
      max1=c[i][j];
    }
  }
  return max1;
}

int main()
{
  int i,N,max[151],ml,nl;
  char m[1001],n[1001];

  scanf("%d",&N);
  for(i=0;i<N;i++){
    scanf("%s",&m[i]);
    scanf("%s",&n[i]);
    ml=length(m);
    nl=length(n);
    max[i]=lcs(ml,nl,m,n);
    printf("%d\n",max[i]);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:52:15: error: passing argument 1 of 'length' from incompatible pointer type [-Wincompatible-pointer-types]
   52 |     ml=length(m);
      |               ^
      |               |
      |               char *
main.c:5:24: note: expected 'const char **' but argument is of type 'char *'
    5 | int length(const char *s[])
      |            ~~~~~~~~~~~~^~~
main.c:53:15: error: passing argument 1 of 'length' from incompatible pointer type [-Wincompatible-pointer-types]
   53 |     nl=length(n);
      |               ^
      |               |
      |               char *
main.c:5:24: note: expected 'const char **' but argument is of type 'char *'
    5 | int length(const char *s[])
      |            ~~~~~~~~~~~~^~~
main.c:54:16: error: passing argument 1 of 'lcs' makes pointer from integer without a cast [-Wint-conversion]
   54 |     max[i]=lcs(ml,nl,m,n);
      |                ^~
      |                |
      |                int
main.c:15:14: note: expected 'char *' but argument is of type 'int'
   15 | int lcs(char X[],char Y[],int m,int n){
      |         ~~~~~^~~
main.c:54:19: error: passing argument 2 of 'lcs' makes pointer from integer without a cast [-Wint-conversion]
   54 |     max[i]=lcs(ml,nl,m,n);
      |                   ^~
      |                   |
      |                   int
main.c:15:23: note: expected 'char *' but argument is of type 'int'
   15 | int lcs(char X[],char Y[],int m,int n){
      |                  ~~~~~^~~
main.c:54:22: error: passing argument 3 of 'lcs' makes integer from pointer without a cast [-Wint-conversion]
   54 |     max[i]=lcs(ml,nl,m,n);
      |                      ^
      |                      |
      |                      char *
main.c:15:31: note: expected 'int' but argument is of type 'char *'
   15 | int lcs(char X[],char Y[],int m,int n){
      |                           ~~~~^
main.c:54:24: error: passing argument 4 of 'lcs' makes integer from pointer without a cast [-Wint-conversion]
   54 |     max[i]=lcs(ml,nl,m,n);
      |                        ^
      |                        |
      |                        char *
main.c:15:37: note: expected 'int' but argument is of type 'char *'
   15 | int lcs(char X[],char Y[],int m,int n){
      |                                 ~~~~^
main.c: In function 'lcs':
main.c:58:1: error: expected declaration or statement at end of input
   58 | }
      | ^