/in/foo.c:3:5: error: variably modified 'data' at file scope
int data[maxn];
^~~~
/in/foo.c:4:5: error: variably modified 'sum' at file scope
int sum[maxn];
^~~
/in/foo.c: In function 'main':
/in/foo.c:8:14: error: 'n' undeclared (first use in this function)
scanf("%d",&n);
^
/in/foo.c:8:14: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:11:11: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
scanf("%d",data[i]);
~^ ~~~~~~~