Language: C

main(){int l=200000,r,q,n=1;char c[600000];scanf("%s%d",c+l,&q);for(r=l;*(c+r)!='\0';++r);do *c=='1'?++n:(*(c+2)^n&1?*(c+r++)=*(c+4):*(c+--l)=*(c+4));while(q--&&gets(c));if(n&1)for(;l<r;putchar(*(c+l++)));else for(;l<r;putchar(*(c+--r)));}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(){int l=200000,r,q,n=1;char c[600000];scanf("%s%d",c+l,&q);for(r=l;*(c+r)!='\0';++r);do *c=='1'?++n:(*(c+2)^n&1?*(c+r++)=*(c+4):*(c+--l)=*(c+4));while(q--&&gets(c));if(n&1)for(;l<r;putchar(*(c+l++)));else for(;l<r;putchar(*(c+--r)));}
      | ^~~~
main.c: In function 'main':
main.c:1:44: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | main(){int l=200000,r,q,n=1;char c[600000];scanf("%s%d",c+l,&q);for(r=l;*(c+r)!='\0';++r);do *c=='1'?++n:(*(c+2)^n&1?*(c+r++)=*(c+4):*(c+--l)=*(c+4));while(q--&&gets(c));if(n&1)for(;l<r;putchar(*(c+l++)));else for(;l<r;putchar(*(c+--r)));}
      |                                            ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(){int l=200000,r,q,n=1;char c[600000];scanf("%s%d",c+l,&q);for(r=l;*(c+r)!='\0';++r);do *c=='1'?++n:(*(c+2)^n&1?*(c+r++)=*(c+4):*(c+--l)=*(c+4));while(q--&&gets(c));if(n&1)for(;l<r;putchar(*(c+l++)));else for(;l<r;putchar(*(c+--r)));}
main.c:1:44: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | main(){int l=200000,r,q,n=1;char c[600000];scanf("%s%d",c+l,&q);for(r=l;*(c+r)!='\0';++r);do *c=='1'?++n:(*(c+2)^n&1?*(c+r++)=*(c+4):*(c+--l)=*(c+4));while(q--&&gets(c));if(n&1)for(;l<r;putchar(*(c+l++)));else for(;l<r;putchar(*(c+--r)));}
      |                                            ^~~~~
main.c:1:44: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:142: error: lvalue required as left operand of assignment
    1 | main(){int l=200000,r,q,n=1;char c[600000];scanf("%s%d",c+l,&q);for(r=l;*(c+r)!='\0';++r);do *c=='1'?++n:(*(c+2)^n&1?*(c+r++)=*(c+4):*(c+--l)=*(c+4));while(q--&&gets(c));if(n&1)for(;l<r;putchar(*(c+l++)));else for(;l<r;putchar(*(c+--r)));}
      |                                                                                                                                              ^
main.c:1:162: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration]
    1 | main(){int l=200000,r,q,n=1;char c[600000];scanf("%s%d",c+l,&q);for(r=l;*(c+r)!='\0';++r);do *c=='1'?++n:(*(c+2)^n&1?*(c+r++)=*(c+4):*(c+--l)=*(c+4));while(q--&&gets(c));if(n&1)for(;l<r;putchar(*(c+l++)));else for(;l<r;putchar(*(c+--r)));}
      |                                                                                                                                                                  ^~~~
main.c:1:187: error: implicit declaration of function 'putchar' [-Wimplicit-function-declaration]
    1 | main(){int l=200000,r,q,n=1;char c[600000];scanf("%s%d",c+l,&q);for(r=l;*(c+r)!='\0';++r);do *c=='1'?++n:(*(c+2)^n&1?*(c+r++)=*(c+4):*(c+--l)=*(c+4));while(q--&&gets(c));if(n&1)for(;l<r;putchar(*(c+l++)));else for(;l<r;putchar(*(c+--r)));}
      |                                                                                                                                                                                           ^~~~~~~
main.c:1:187: note: include '<stdio.h>' or provide a declaration of 'putchar'