실행 실패 (제출 코드 컴파일 에러)
Main.c: In function ‘insert’: Main.c:8:28: warning: implicit declaration of function ‘malloc’ [-Wimplicit-function-declaration] 8 | Node* newNode = (Node*)malloc(sizeof(Node)); | ^~~~~~ Main.c:2:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’ 1 | #include<stdio.h> +++ |+#include <stdlib.h> 2 | typedef struct Node{ Main.c:8:28: warning: incompatible implicit declaration of built-in function ‘malloc’ [-Wbuiltin-declaration-mismatch] 8 | Node* newNode = (Node*)malloc(sizeof(Node)); | ^~~~~~ Main.c:8:28: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’ Main.c:10:9: error: ‘head’ undeclared (first use in this function); did you mean ‘haed’? 10 | if(*head->num > n){ | ^~~~ | haed Main.c:10:9: note: each undeclared identifier is reported only once for each function it appears in Main.c: In function ‘main’: Main.c:31:25: warning: incompatible implicit declaration of built-in function ‘malloc’ [-Wbuiltin-declaration-mismatch] 31 | Node* head = (Node*)malloc(sizeof(Node)); | ^~~~~~ Main.c:31:25: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’ Main.c:36:16: error: expected expression before ‘Node’ 36 | insert(Node* head,n) | ^~~~ Main.c:36:9: error: too few arguments to function ‘insert’ 36 | insert(Node* head,n) | ^~~~~~ Main.c:7:6: note: declared here 7 | void insert(Node** haed, int n){ | ^~~~~~ Main.c:36:29: error: expected ‘;’ before ‘}’ token 36 | insert(Node* head,n) | ^ | ; 37 | } | ~ Main.c:30:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 30 | scanf("%d %d",&N,&n); | ^~~~~~~~~~~~~~~~~~~~ Main.c:35:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 35 | scanf("%d",&n); | ^~~~~~~~~~~~~~
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.