실행 실패 (제출 코드 컴파일 에러)
Main.c:7:1: error: expected ‘;’, identifier or ‘(’ before ‘void’ 7 | void insert(Node** haed, int n){ | ^~~~ Main.c:7:13: error: unknown type name ‘Node’ 7 | void insert(Node** haed, int n){ | ^~~~ Main.c: In function ‘main’: Main.c:31:5: error: unknown type name ‘Node’; use ‘struct’ keyword to refer to the type 31 | Node* head = (Node*)malloc(sizeof(Node)); | ^~~~ | struct Main.c:31:19: error: ‘Node’ undeclared (first use in this function) 31 | Node* head = (Node*)malloc(sizeof(Node)); | ^~~~ Main.c:31:19: note: each undeclared identifier is reported only once for each function it appears in Main.c:31:24: error: expected expression before ‘)’ token 31 | Node* head = (Node*)malloc(sizeof(Node)); | ^ Main.c:32:9: error: request for member ‘num’ in something not a structure or union 32 | head->num = n; | ^~ Main.c:33:9: error: request for member ‘next’ in something not a structure or union 33 | head->next = NULL; | ^~ Main.c:36:9: warning: implicit declaration of function ‘insert’ [-Wimplicit-function-declaration] 36 | insert(Node* head,n) | ^~~~~~ Main.c:36:29: error: expected ‘;’ before ‘}’ token 36 | insert(Node* head,n) | ^ | ; 37 | } | ~ Main.c:38:34: error: request for member ‘next’ in something not a structure or union 38 | for(;head != NULL;head = head->next) | ^~ Main.c:39:25: error: request for member ‘num’ in something not a structure or union 39 | printf("%d",head->num); | ^~ 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); | ^~~~~~~~~~~~~~
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.