Language: C

#include<stdio.h>
#include<string.h>
void swap(char *string1,char *string2, int (l+1)){
  char temp[l+1];
  strcpy(temp,*string1);
  strcpy(*string1,*string2);
  strcpy(*string2,temp);
}
int main(){
  int n,l;
  scanf("%d %d\n",&n,&l);
  int char string[n][l+1];
  int i;
  for(i=0;i<n;i++){
    scanf("%s\n",(string+i));
  }
  for(i=0;i<n-1;i++){
    int min_i= i;
    int j;
    int d;
    for(j=i+1;j<n;j++){
      d= strcmp(string[min_i],string[j]);
      if(d>0){
        min_i=j;
      }
    }
    swap(string[i],string[min_i],(l+1));
  }
  char final_string[n*l + 1]={""};
  for(i=0;i<n;i++){
    final_string= strcat(final_string,(string+i));
  }
  printf("%s",final_string);
  return 0;
}

Compiler output:
main.c:3:46: error: expected ')' before '+' token
    3 | void swap(char *string1,char *string2, int (l+1)){
      |                                              ^
      |                                              )
main.c: In function 'main':
main.c:12:7: error: two or more data types in declaration specifiers
   12 |   int char string[n][l+1];
      |       ^~~~
main.c:22:23: error: passing argument 1 of 'strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
   22 |       d= strcmp(string[min_i],string[j]);
      |                 ~~~~~~^~~~~~~
      |                       |
      |                       int *
In file included from main.c:2:
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'int *'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:22:37: error: passing argument 2 of 'strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
   22 |       d= strcmp(string[min_i],string[j]);
      |                               ~~~~~~^~~
      |                                     |
      |                                     int *
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'int *'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
main.c:27:5: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
   27 |     swap(string[i],string[min_i],(l+1));
      |     ^~~~
main.c:29:30: error: variable-sized object may not be initialized except with an empty initializer
   29 |   char final_string[n*l + 1]={""};
      |                              ^
main.c:31:46: error: passing argument 2 of 'strcat' from incompatible pointer type [-Wincompatible-pointer-types]
   31 |     final_string= strcat(final_string,(string+i));
      |                                       ~~~~~~~^~~
      |                                              |
      |                                              int (*)[l + 1]
/usr/include/string.h:149:70: note: expected 'const char * restrict' but argument is of type 'int (*)[l + 1]'
  149 | extern char *strcat (char *__restrict __dest, const char *__restrict __src)
      |                                               ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
main.c:31:17: error: assignment to expression with array type
   31 |     final_string= strcat(final_string,(string+i));
      |                 ^