foo.c: In function ‘main’:
foo.c:15:21: error: ‘n’ undeclared (first use in this function); did you mean ‘n1’?
15 | scanf("%d",&n);
| ^
| n1
foo.c:15:21: note: each undeclared identifier is reported only once for each function it appears in
foo.c:24:15: error: expected ‘;’ before ‘for’
24 | b[0]=x
| ^
| ;
25 | for(count2=1;count2<n2+1;count2++){
| ~~~
foo.c:23:13: warning: unused variable ‘count2’ [-Wunused-variable]
23 | int count2;
| ^~~~~~
foo.c:22:13: warning: variable ‘b’ set but not used [-Wunused-but-set-variable]
22 | int b[n2];
| ^