foo.c:4:9: error: unknown type name 'Node'
4 | Node* next;
| ^~~~
foo.c:6:13: error: unknown type name 'Node'
6 | void Output(Node* head) {
| ^~~~
foo.c:12:1: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
12 | Node* create(int arr[], int n) {
| ^~~~
| struct
foo.c: In function 'create':
foo.c:13:9: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
13 | Node* head = NULL;
| ^~~~
| struct
foo.c:16:17: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
16 | Node* newp = new Node;
| ^~~~
| struct
foo.c:16:30: error: 'new' undeclared (first use in this function); did you mean 'newp'?
16 | Node* newp = new Node;
| ^~~
| newp
foo.c:16:30: note: each undeclared identifier is reported only once for each function it appears in
foo.c:16:34: error: expected ',' or ';' before 'Node'
16 | Node* newp = new Node;
| ^~~~
foo.c:17:21: error: request for member 'data' in something not a structure or union
17 | newp->data = arr[i];
| ^~
foo.c:18:21: error: request for member 'next' in something not a structure or union
18 | newp->next=head;
| ^~
foo.c: At top level:
foo.c:23:1: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
23 | Node* findmax(Node* head) {
| ^~~~
| struct
foo.c:23:15: error: unknown type name 'Node'
23 | Node* findmax(Node* head) {
| ^~~~
foo.c: In function 'main':
foo.c:35:9: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
35 | Node* head1 = NULL,*head2=NULL,*max1=NULL,*max2=NULL;
| ^~~~
| struct
foo.c:43:16: warning: implicit declaration of function 'findmax' [-Wimplicit-function-declaration]
43 | max1 = findmax(head1);
| ^~~~~~~
foo.c:43:14: warning: assignment to 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
43 | max1 = findmax(head1);
| ^
foo.c:44:14: warning: assignment to 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
44 | max2 = findmax(head2);
| ^
foo.c:45:29: error: request for member 'data' in something not a structure or union
45 | printf("%d %d", max1->data,max2->data);
| ^~
foo.c:45:40: error: request for member 'data' in something not a structure or union
45 | printf("%d %d", max1->data,max2->data);
| ^~
[Hydro](https://hydro.ac)提供评测服务