foo.c: In function 'main':
foo.c:10:4: error: 'new' undeclared (first use in this function)
10 | p=new int[n];
| ^~~
foo.c:10:4: note: each undeclared identifier is reported only once for each function it appears in
foo.c:10:7: error: expected ';' before 'int'
10 | p=new int[n];
| ^~~~
| ;
foo.c:9:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
9 | scanf("%d%d",&n,&m);
| ^~~~~~~~~~~~~~~~~~~
foo.c:13:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
13 | scanf("%d",&p[i]);
| ^~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务