Language: C

#include<stdio.h>
#include<stdlib.h>
#define MAX 100001
#define max2(a,b) a<b?b:a
#define max3(a,b,c) max2((max2(a,b)),c)
#define max4(a,b,c,d) max3((max2(a,b)),c,d)

struct DATA{
	char s[400001];
	int num;
}d[MAX],tmp[MAX];

int my_strcmp(const void *s1,const void *s2){
  int i;

  for(i = 0;*(str1 + i) == *(str2 + i);i++){
	  struct DATA d1 = *(struct DATA*)s1;
	  struct DATA d2 = *(struct DATA*)s2;
	  char str1[400001];
	  str1 = strcpy(str1,s1.s);
	  char str2[400001];
	  str2 = strcpy(str2,s2.s);
      if(*(str1 + i) == '\0')
        return 0;
    }
  
  return *(str1 + i) - *(str2 + i);
} 

int main(){
	int i,j,k,l,m;
	int ans = 0;
	int min = 0;
	int tmp,t;
	int flag = 0;
	char qq['z'+1]={0};
	char c;
	int n,q;
	int flag[400001]={0};
	
	scanf("%d",&n);
	for(i = 0;i < n;i++){
		scanf("%s",d[i].s);
		d.num = i+1;
	}
	scanf("%d",&q);
	for(i = 0;i < q;i++){
		scanf("%d ",&k);
		for(j = 0;j < 26;j++){
			scanf("%c",&c);
			qq[c]=j+'a';
		}
		for(l = 1;l<n+1;l++){
			strcpy(tmp[l].s,d[l].s);
			for(j = 0; tmp[l].[j]!='\0';j++){
				tmp[l].[j] = qq[tmp[l].s[j]];
			}
		}
		
		qsort(d, n, sizeof(struct DATA), strcmp);
		
	}
	
	printf("%d\n",ans);
	return 0;
}

Compiler output:
main.c: In function 'my_strcmp':
main.c:16:15: error: 'str1' undeclared (first use in this function); did you mean 's1'?
   16 |   for(i = 0;*(str1 + i) == *(str2 + i);i++){
      |               ^~~~
      |               s1
main.c:16:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:30: error: 'str2' undeclared (first use in this function); did you mean 's2'?
   16 |   for(i = 0;*(str1 + i) == *(str2 + i);i++){
      |                              ^~~~
      |                              s2
main.c:20:18: error: implicit declaration of function 'strcpy' [-Wimplicit-function-declaration]
   20 |           str1 = strcpy(str1,s1.s);
      |                  ^~~~~~
main.c:3:1: note: include '<string.h>' or provide a declaration of 'strcpy'
    2 | #include<stdlib.h>
  +++ |+#include <string.h>
    3 | #define MAX 100001
main.c:20:18: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch]
   20 |           str1 = strcpy(str1,s1.s);
      |                  ^~~~~~
main.c:20:18: note: include '<string.h>' or provide a declaration of 'strcpy'
main.c:20:32: error: request for member 's' in something not a structure or union
   20 |           str1 = strcpy(str1,s1.s);
      |                                ^
main.c:22:32: error: request for member 's' in something not a structure or union
   22 |           str2 = strcpy(str2,s2.s);
      |                                ^
main.c: In function 'main':
main.c:39:13: error: conflicting types for 'flag'; have 'int[400001]'
   39 |         int flag[400001]={0};
      |             ^~~~
main.c:35:13: note: previous definition of 'flag' with type 'int'
   35 |         int flag = 0;
      |             ^~~~
main.c:44:18: error: '(struct DATA *)&d' is a pointer; did you mean to use '->'?
   44 |                 d.num = i+1;
      |                  ^
      |                  ->
main.c:54:25: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch]
   54 |                         strcpy(tmp[l].s,d[l].s);
      |                         ^~~~~~
main.c:54:25: note: include '<string.h>' or provide a declaration of 'strcpy'
main.c:54:35: error: subscripted value is neither array nor pointer nor vector
   54 |                         strcpy(tmp[l].s,d[l].s);
      |                                   ^
main.c:55:39: error: subscripted value is neither array nor pointer nor vector
   55 |                         for(j = 0; tmp[l].[j]!='\0';j++){
      |                                       ^
main.c:55:43: error: expected identifier before '[' token
   55 |                         for(j = 0; tmp[l].[j]!='\0';j++){
      |                                           ^
main.c:56:36: error: subscripted value is neither array nor pointer nor vector
   56 |                                 tmp[l].[j] = qq[tmp[l].s[j]];
      |                                    ^
main.c:56:40: error: expected identifier before '[' token
   56 |                                 tmp[l].[j] = qq[tmp[l].s[j]];
      |                                        ^
main.c:60:50: error: 'strcmp' undeclared (first use in this function)
   60 |                 qsort(d, n, sizeof(struct DATA), strcmp);
      |                                                  ^~~~~~
main.c:60:50: note: 'strcmp' is defined in header '<string.h>'; this is probably fixable by adding '#include <string.h>'