Language: C

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

int main(void)
{
    int n;
    scanf("%d",&n);
    char s[100][11];
    int p[100];
    int num[100];
    int i,j;
    for(i=0;i<n;i++){
        gets(s[i]);
        scanf("%d",p[i]);
        n[i]=i+1;
    }
    char char_tmp;int int_tmp,tmp;

    for(i=0;i<n-1;i++){
        for(j=n-1;j>i;j--){
            if(strcmp(s[j-1],s[j])>0){
                char_temp=s[j-1];
                s[j-1]=s[j];
                s[j]=char_temp;
                int_temp=p[j-1];
                p[j-1]=p[j];
                p[j]=int_temp;
                tmp=n[j-1];
                n[j]=tmp;
                n[j-1]=n[j];
        }
    }

    for(i=0;i<n-1;i++){
        for(j=n-1;j>i;j--){
            if(p[j-1]<p[j]){
                tmp=n[j-1];
                n[j]=tmp;
                n[j-1]=n[j];
            }
        }
    }

    for(i=0;i<n;i++){
        printf("%d\n",n[i]);
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   14 |         gets(s[i]);
      |         ^~~~
      |         fgets
main.c:16:10: error: subscripted value is neither array nor pointer nor vector
   16 |         n[i]=i+1;
      |          ^
main.c:23:17: error: 'char_temp' undeclared (first use in this function); did you mean 'char_tmp'?
   23 |                 char_temp=s[j-1];
      |                 ^~~~~~~~~
      |                 char_tmp
main.c:23:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:23: error: assignment to expression with array type
   24 |                 s[j-1]=s[j];
      |                       ^
main.c:26:17: error: 'int_temp' undeclared (first use in this function); did you mean 'int_tmp'?
   26 |                 int_temp=p[j-1];
      |                 ^~~~~~~~
      |                 int_tmp
main.c:29:22: error: subscripted value is neither array nor pointer nor vector
   29 |                 tmp=n[j-1];
      |                      ^
main.c:30:18: error: subscripted value is neither array nor pointer nor vector
   30 |                 n[j]=tmp;
      |                  ^
main.c:31:18: error: subscripted value is neither array nor pointer nor vector
   31 |                 n[j-1]=n[j];
      |                  ^
main.c:31:25: error: subscripted value is neither array nor pointer nor vector
   31 |                 n[j-1]=n[j];
      |                         ^
main.c:38:22: error: subscripted value is neither array nor pointer nor vector
   38 |                 tmp=n[j-1];
      |                      ^
main.c:39:18: error: subscripted value is neither array nor pointer nor vector
   39 |                 n[j]=tmp;
      |                  ^
main.c:40:18: error: subscripted value is neither array nor pointer nor vector
   40 |                 n[j-1]=n[j];
      |                  ^
main.c:40:25: error: subscripted value is neither array nor pointer nor vector
   40 |                 n[j-1]=n[j];
      |                         ^
main.c:46:24: error: subscripted value is neither array nor pointer nor vector
   46 |         printf("%d\n",n[i]);
      |                        ^
main.c:49:1: error: expected declaration or statement at end of input
   49 | }
      | ^