Language: C

char c[9];t,p;main(m){for(;gets(c),*c-'-';p=!printf("%s%.*s\n",c+p,p,c))for(scanf("%d",&m);m--;p=(p+t)%strlen(c))scanf("%d ",&t);exit(0);}
char c[];t,p;main(m){for(;gets(c),*c-'-';p=!printf("%s%.*s\n",c+p,p,c))for(scanf("%d",&m);m--;p=(p+t)%strlen(c))scanf("%d ",&t);exit(0);}

Compiler output:
main.c:1:11: warning: data definition has no type or storage class
    1 | char c[9];t,p;main(m){for(;gets(c),*c-'-';p=!printf("%s%.*s\n",c+p,p,c))for(scanf("%d",&m);m--;p=(p+t)%strlen(c))scanf("%d ",&t);exit(0);}
      |           ^
main.c:1:11: error: type defaults to 'int' in declaration of 't' [-Wimplicit-int]
main.c:1:13: error: type defaults to 'int' in declaration of 'p' [-Wimplicit-int]
    1 | char c[9];t,p;main(m){for(;gets(c),*c-'-';p=!printf("%s%.*s\n",c+p,p,c))for(scanf("%d",&m);m--;p=(p+t)%strlen(c))scanf("%d ",&t);exit(0);}
      |             ^
main.c:1:15: error: return type defaults to 'int' [-Wimplicit-int]
    1 | char c[9];t,p;main(m){for(;gets(c),*c-'-';p=!printf("%s%.*s\n",c+p,p,c))for(scanf("%d",&m);m--;p=(p+t)%strlen(c))scanf("%d ",&t);exit(0);}
      |               ^~~~
main.c: In function 'main':
main.c:1:15: error: type of 'm' defaults to 'int' [-Wimplicit-int]
main.c:1:28: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration]
    1 | char c[9];t,p;main(m){for(;gets(c),*c-'-';p=!printf("%s%.*s\n",c+p,p,c))for(scanf("%d",&m);m--;p=(p+t)%strlen(c))scanf("%d ",&t);exit(0);}
      |                            ^~~~
main.c:1:46: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | char c[9];t,p;main(m){for(;gets(c),*c-'-';p=!printf("%s%.*s\n",c+p,p,c))for(scanf("%d",&m);m--;p=(p+t)%strlen(c))scanf("%d ",&t);exit(0);}
      |                                              ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 | char c[9];t,p;main(m){for(;gets(c),*c-'-';p=!printf("%s%.*s\n",c+p,p,c))for(scanf("%d",&m);m--;p=(p+t)%strlen(c))scanf("%d ",&t);exit(0);}
main.c:1:46: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    1 | char c[9];t,p;main(m){for(;gets(c),*c-'-';p=!printf("%s%.*s\n",c+p,p,c))for(scanf("%d",&m);m--;p=(p+t)%strlen(c))scanf("%d ",&t);exit(0);}
      |                                              ^~~~~~
main.c:1:46: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:77: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | char c[9];t,p;main(m){for(;gets(c),*c-'-';p=!printf("%s%.*s\n",c+p,p,c))for(scanf("%d",&m);m--;p=(p+t)%strlen(c))scanf("%d ",&t);exit(0);}
      |                                                                             ^~~~~
main.c:1:77: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:77: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
main.c:1:77: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:104: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    1 | char c[9];t,p;main(m){for(;gets(c),*c-'-';p=!printf("%s%.*s\n",c+p,p,c))for(scanf("%d",&m);m--;p=(p+t)%strlen(c))scanf("%d ",&t);exit(0);}
      |                                                                                                        ^~~~~~
main.c:1:1: note: include '<string.h>' or provide a declaration of 'strlen'
  +++ |+#include <string.h>
    1 | char c[9];t,p;main(m){for(;gets(c),*c-'-';p=!printf("%s%.*s\n",c+p,p,c))for(scanf("%d",&m);m--;p=(p+t)%strlen(c))scanf("%d ",&t);exit(0);}
main.c:1:104: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    1 | char c[9];t,p;main(m){for(;gets(c),*c-'-';p=!printf("%s%.*s\n",c+p,p,c))for(scanf("%d",&m);m--;p=(p+t)%strlen(c))scanf("%d ",&t);exit(0);}
      |                                                                                                        ^~~~~~
main.c:1:104: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:1:130: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
    1 | char c[9];t,p;main(m){for(;gets(c),*c-'-';p=!printf("%s%.*s\n",c+p,p,c))for(scanf("%d",&m);m--;p=(p+t)%strlen(c))scanf("%d ",&t);exit(0);}
      |                                                                                                                                  ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
  +++ |+#include <stdlib.h>
    1 | char c[9];t,p;main(m){for(;gets(c),*c-'-';p=!printf("%s%.*s\n",c+p,p,c))for(scanf("%d",&m);m--;p=(p+t)%strlen(c))scanf("%d ",&t);exit(0);}
main.c:1:130: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
    1 | char c[9];t,p;main(m){for(;gets(c),*c-'-';p=!printf("%s%.*s\n",c+p,p,c))for(scanf("%d",&m);m--;p=(p+t)%strlen(c))scanf("%d ",&t);exit(0);}
      |                                                                                                                                  ^~~~
main.c:1:130: note: include '<stdlib.h>' or provide a declaration of 'exit'
main.c: At top level:
main.c:2:10: warning: data definition has no type or storage class
    2 | char c[];t,p;main(m){for(;gets(c),*c-'-';p=!printf("%s%.*s\n",c+p,p,c))for(scanf("%d",&m);m--;p=(p+t)%strlen(c))scanf("%d ",&t);exit(0);}
      |          ^
main.c:2:10: error: type defaults to 'int' in declaration of 't' [-Wimplicit-int]
main.c:2:12: error: type defaults to 'int' in declaration of 'p' [-Wimplicit-int]
    2 | char c[];t,p;main(m){for(;gets(c),*c-'-';p=!printf("%s%.*s\n",c+p,p,c))for(scanf("%d",&m);m--;p=(p+t)%strlen(c))scanf("%d ",&t);exit(0);}
      |            ^
main.c:2:14: error: return type defaults to 'int' [-Wimplicit-int]
    2 | char c[];t,p;main(m){for(;gets(c),*c-'-';p=!printf("%s%.*s\n",c+p,p,c))for(scanf("%d",&m);m--;p=(p+t)%strlen(c))scanf("%d ",&t);exit(0);}
      |              ^~~~
main.c:2:14: error: redefinition of 'main'
main.c:1:15: note: previous definition of 'main' with type 'int()'
    1 | char c[9];t,p;main(m){for(;gets(c),*c-'-';p=!printf("%s%.*s\n",c+p,p,c))for(scanf("%d",&m);m--;p=(p+t)%strlen(c))scanf("%d ",&t);exit(0);}
      |               ^~~~
main.c: In function 'main':
main.c:2:14: error: type of 'm' defaults to 'int' [-Wimplicit-int]
    2 | char c[];t,p;main(m){for(;gets(c),*c-'-';p=!printf("%s%.*s\n",c+p,p,c))for(scanf("%d",&m);m--;p=(p+t)%strlen(c))scanf("%d ",&t);exit(0);}
      |              ^~~~
main.c:2:45: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    2 | char c[];t,p;main(m){for(;gets(c),*c-'-';p=!printf("%s%.*s\n",c+p,p,c))for(scanf("%d",&m);m--;p=(p+t)%strlen(c))scanf("%d ",&t);exit(0);}
      |                                             ^~~~~~
main.c:2:45: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:2:76: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    2 | char c[];t,p;main(m){for(;gets(c),*c-'-';p=!printf("%s%.*s\n",c+p,p,c))for(scanf("%d",&m);m--;p=(p+t)%strlen(c))scanf("%d ",&t);exit(0);}
      |                                                                            ^~~~~
main.c:2:76: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:2:103: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    2 | char c[];t,p;main(m){for(;gets(c),*c-'-';p=!printf("%s%.*s\n",c+p,p,c))for(scanf("%d",&m);m--;p=(p+t)%strlen(c))scanf("%d ",&t);exit(0);}
      |                                                                                                       ^~~~~~
main.c:2:103: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:2:129: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
    2 | char c[];t,p;main(m){for(;gets(c),*c-'-';p=!printf("%s%.*s\n",c+p,p,c))for(scanf("%d",&m);m--;p=(p+t)%strlen(c))scanf("%d ",&t);exit(0);}
      |                                                                                                                                 ^~~~
main.c:2:129: note: include '<stdlib.h>' or provide a declaration of 'exit'