warning: 'struct node' declared inside parameter list will not be visible outside of this definition or declaration
struct Node *addNode(struct node *next , int n ) {
^~~~
: In function 'addNode':
warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
new->next = next;
^
In function 'main':
warning: passing argument 1 of 'addNode' makes pointer from integer without a cast [-Wint-conversion]
head = addNode(1, head);
^
note: expected 'struct node *' but argument is of type 'int'
struct Node *addNode(struct node *next , int n ) {
^~~~~~~
warning: passing argument 2 of 'addNode' makes integer from pointer without a cast [-Wint-conversion]
head = addNode(1, head);
^~~~
note: expected 'int' but argument is of type 'struct Node *'
struct Node *addNode(struct node *next , int n ) {
^~~~~~~