Language: C

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

char StrCount();

main(void){
    int i = 0, m, num, cnt = 0;
    char str[100], target;
    
    scanf("%d", &num);
    scanf("%s", str);
    
    for( ; num > 0; num--){
        str = StrCount(str);
    }
    
    return 0;
}

char StrCount(char str[100]){
    int i =0, m, cnt = 0;
    char target,restr[100];
    
    target = str[0];
    for( m = strlen(str); i <= m; i++){
        if( target == str[i]){
            cnt++;
        }else{
            if( i == 0){
                strncat(restr, '1', 101);
                strncat(restr, str[0], 101);
                target = str[1];
            }else{
                strncat(restr, (char)cnt, 101);
                strncat(restr, str[0],101);
                target = str[i];
            }
        }
    }
    
    return restr;
}

Compiler output:
main.c:6:1: error: return type defaults to 'int' [-Wimplicit-int]
    6 | main(void){
      | ^~~~
main.c: In function 'main':
main.c:14:13: error: assignment to expression with array type
   14 |         str = StrCount(str);
      |             ^
main.c: In function 'StrCount':
main.c:30:32: error: passing argument 2 of 'strncat' makes pointer from integer without a cast [-Wint-conversion]
   30 |                 strncat(restr, '1', 101);
      |                                ^~~
      |                                |
      |                                int
In file included from main.c:2:
/usr/include/string.h:152:71: note: expected 'const char * restrict' but argument is of type 'int'
  152 | extern char *strncat (char *__restrict __dest, const char *__restrict __src,
      |                                                ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
main.c:31:35: error: passing argument 2 of 'strncat' makes pointer from integer without a cast [-Wint-conversion]
   31 |                 strncat(restr, str[0], 101);
      |                                ~~~^~~
      |                                   |
      |                                   char
/usr/include/string.h:152:71: note: expected 'const char * restrict' but argument is of type 'char'
  152 | extern char *strncat (char *__restrict __dest, const char *__restrict __src,
      |                                                ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
main.c:34:32: error: passing argument 2 of 'strncat' makes pointer from integer without a cast [-Wint-conversion]
   34 |                 strncat(restr, (char)cnt, 101);
      |                                ^~~~~~~~~
      |                                |
      |                                char
/usr/include/string.h:152:71: note: expected 'const char * restrict' but argument is of type 'char'
  152 | extern char *strncat (char *__restrict __dest, const char *__restrict __src,
      |                                                ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
main.c:35:35: error: passing argument 2 of 'strncat' makes pointer from integer without a cast [-Wint-conversion]
   35 |                 strncat(restr, str[0],101);
      |                                ~~~^~~
      |                                   |
      |                                   char
/usr/include/string.h:152:71: note: expected 'const char * restrict' but argument is of type 'char'
  152 | extern char *strncat (char *__restrict __dest, const char *__restrict __src,
      |                                                ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
main.c:41:12: error: returning 'char *' from a function with return type 'char' makes integer from pointer without a cast [-Wint-conversion]
   41 |     return restr;
      |            ^~~~~