foo.c: In function 'Output':
foo.c:6:18: warning: format '%d' expects argument of type 'int', but argument 2 has type 'int *' [-Wformat=]
6 | printf("%d ", &a[i]);
| ~^ ~~~~~
| | |
| int int *
| %ls
foo.c: In function 'main':
foo.c:13:13: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
13 | scanf("%d", n);
| ~^ ~
| | |
| | int
| int *
foo.c:15:17: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
15 | scanf("%d", a[i]);
| ~^ ~~~~
| | |
| | int
| int *
foo.c:16:12: warning: passing argument 1 of 'Output' makes integer from pointer without a cast [-Wint-conversion]
16 | Output(a, n);
| ^
| |
| int *
foo.c:3:16: note: expected 'int' but argument is of type 'int *'
3 | int Output(int n, int a[])
| ~~~~^
foo.c:16:15: warning: passing argument 2 of 'Output' makes pointer from integer without a cast [-Wint-conversion]
16 | Output(a, n);
| ^
| |
| int
foo.c:3:23: note: expected 'int *' but argument is of type 'int'
3 | int Output(int n, int a[])
| ~~~~^~~
[Hydro](https://hydro.ac)提供评测服务