Language: C

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

int main(){
  int len;
  char s[100];
  int c;
  scanf("%d", &len);
  int p;
  char ls[100], char rs[100];
  char matchs[100];
  
  
  p = 1;
  int lp, rp;
  int j;
  
  
  int maxc = 0;
  lp = 1; // ひだりの長さ
  while(lp < len){
  c = 0;
    
    
  
    rp = len-1; // 右のながさ
    
    strcpy(rs, s[lp+1]);
    
    for(j = 0; j < lp; j++){
    if((strstr(rs,s[j]) != NULL) && (strstr(matchs, s[j]) == NULL)){ // 左の文字列があるとき
    
      strcat(matchs, s[j]);
      c++;
        
    }
    
      if(maxc < c)
        maxc = c;
  lp++;
}
 
    printf("%d\n", c);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:17: error: expected identifier or '(' before 'char'
   10 |   char ls[100], char rs[100];
      |                 ^~~~
main.c:28:12: error: 'rs' undeclared (first use in this function); did you mean 'rp'?
   28 |     strcpy(rs, s[lp+1]);
      |            ^~
      |            rp
main.c:28:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:28:17: error: passing argument 2 of 'strcpy' makes pointer from integer without a cast [-Wint-conversion]
   28 |     strcpy(rs, s[lp+1]);
      |                ~^~~~~~
      |                 |
      |                 char
In file included from main.c:2:
/usr/include/string.h:141:70: note: expected 'const char * restrict' but argument is of type 'char'
  141 | extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
      |                                               ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
main.c:31:20: error: passing argument 2 of 'strstr' makes pointer from integer without a cast [-Wint-conversion]
   31 |     if((strstr(rs,s[j]) != NULL) && (strstr(matchs, s[j]) == NULL)){ // 左の文字列があるとき
      |                   ~^~~
      |                    |
      |                    char
/usr/include/string.h:350:58: note: expected 'const char *' but argument is of type 'char'
  350 | extern char *strstr (const char *__haystack, const char *__needle)
      |                                              ~~~~~~~~~~~~^~~~~~~~
main.c:31:54: error: passing argument 2 of 'strstr' makes pointer from integer without a cast [-Wint-conversion]
   31 |     if((strstr(rs,s[j]) != NULL) && (strstr(matchs, s[j]) == NULL)){ // 左の文字列があるとき
      |                                                     ~^~~
      |                                                      |
      |                                                      char
/usr/include/string.h:350:58: note: expected 'const char *' but argument is of type 'char'
  350 | extern char *strstr (const char *__haystack, const char *__needle)
      |                                              ~~~~~~~~~~~~^~~~~~~~
main.c:33:23: error: passing argument 2 of 'strcat' makes pointer from integer without a cast [-Wint-conversion]
   33 |       strcat(matchs, s[j]);
      |                      ~^~~
      |                       |
      |                       char
/usr/include/string.h:149:70: note: expected 'const char * restrict' but argument is of type 'char'
  149 | extern char *strcat (char *__restrict __dest, const char *__restrict __src)
      |                                               ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
main.c:45:1: error: expected declaration or statement at end of input
   45 | }
      | ^