실행 실패 (제출 코드 컴파일 에러)
Main.c: In function ‘main’: Main.c:25:29: warning: passing argument 4 of ‘bsearch’ makes integer from pointer without a cast [-Wint-conversion] 25 | if (bsearch(&k, A, N, compare)) { | ^~~~~~~ | | | int (*)(const void *, const void *) In file included from /usr/include/stdlib.h:833, from Main.c:2: /usr/include/aarch64-linux-gnu/bits/stdlib-bsearch.h:20:72: note: expected ‘size_t’ {aka ‘long unsigned int’} but argument is of type ‘int (*)(const void *, const void *)’ 20 | bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, | ~~~~~~~^~~~~~ Main.c:25:11: error: too few arguments to function ‘bsearch’ 25 | if (bsearch(&k, A, N, compare)) { | ^~~~~~~ In file included from /usr/include/stdlib.h:833, from Main.c:2: /usr/include/aarch64-linux-gnu/bits/stdlib-bsearch.h:20:1: note: declared here 20 | bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, | ^~~~~~~ Main.c:13:4: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 13 | scanf("%d", &N); | ^~~~~~~~~~~~~~~ Main.c:16:7: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 16 | scanf("%d", &A[i]); | ^~~~~~~~~~~~~~~~~~ Main.c:21:4: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 21 | scanf("%d", &M); | ^~~~~~~~~~~~~~~ Main.c:24:7: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 24 | scanf("%d", &k); | ^~~~~~~~~~~~~~~
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.