Language: C

int main(){int l=250000,r,q,n=1;char c[600000];scanf("%s",c+250000);scanf("%d",&q);for(r=l;c[r]!='\0';++r);do c[0]=='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]));return 0;}

Compiler output:
main.c: In function 'main':
main.c:1:48: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | int main(){int l=250000,r,q,n=1;char c[600000];scanf("%s",c+250000);scanf("%d",&q);for(r=l;c[r]!='\0';++r);do c[0]=='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]));return 0;}
      |                                                ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(){int l=250000,r,q,n=1;char c[600000];scanf("%s",c+250000);scanf("%d",&q);for(r=l;c[r]!='\0';++r);do c[0]=='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]));return 0;}
main.c:1:48: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | int main(){int l=250000,r,q,n=1;char c[600000];scanf("%s",c+250000);scanf("%d",&q);for(r=l;c[r]!='\0';++r);do c[0]=='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]));return 0;}
      |                                                ^~~~~
main.c:1:48: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:153: error: lvalue required as left operand of assignment
    1 | int main(){int l=250000,r,q,n=1;char c[600000];scanf("%s",c+250000);scanf("%d",&q);for(r=l;c[r]!='\0';++r);do c[0]=='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]));return 0;}
      |                                                                                                                                                         ^
main.c:1:171: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration]
    1 | int main(){int l=250000,r,q,n=1;char c[600000];scanf("%s",c+250000);scanf("%d",&q);for(r=l;c[r]!='\0';++r);do c[0]=='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]));return 0;}
      |                                                                                                                                                                           ^~~~
main.c:1:196: error: implicit declaration of function 'putchar' [-Wimplicit-function-declaration]
    1 | int main(){int l=250000,r,q,n=1;char c[600000];scanf("%s",c+250000);scanf("%d",&q);for(r=l;c[r]!='\0';++r);do c[0]=='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]));return 0;}
      |                                                                                                                                                                                                    ^~~~~~~
main.c:1:196: note: include '<stdio.h>' or provide a declaration of 'putchar'