foo.c: In function 'main':
foo.c:19:8: warning: passing argument 1 of 'scanf' makes pointer from integer without a cast [-Wint-conversion]
scanf(n,"%d");
^
In file included from /usr/include/features.h:424:0,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdio.h:27,
from foo.c:1:
/usr/include/stdio.h:398:12: note: expected 'const char * restrict' but argument is of type 'int'
extern int __REDIRECT (scanf, (const char *__restrict __format, ...),
^
foo.c:24:9: warning: passing argument 1 of 'scanf' makes pointer from integer without a cast [-Wint-conversion]
scanf(a[i],"%d");
^
In file included from /usr/include/features.h:424:0,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdio.h:27,
from foo.c:1:
/usr/include/stdio.h:398:12: note: expected 'const char * restrict' but argument is of type 'int'
extern int __REDIRECT (scanf, (const char *__restrict __format, ...),
^
foo.c:19:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf(n,"%d");
^~~~~~~~~~~~~
foo.c:24:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf(a[i],"%d");
^~~~~~~~~~~~~~~~
foo.c:19:2: warning: 'n' is used uninitialized in this function [-Wuninitialized]
scanf(n,"%d");
^~~~~~~~~~~~~
#'target_mem_ref' not supported by expression#'foo.c:8:7: warning: may be used uninitialized in this function [-Wmaybe-uninitialized]
if(a[i]>a[iMax])
~^~~
[Hydro](https://hydro.ac)提供评测服务