#include <stdio.h>
typedef struct Node
{
int coeff, power;
void* next;
} Node;
void append(int coeff, int power, Node *head)
{
Node *temp;
Node *new;
new = (Node*) malloc(sizeof(Node));
temp = (Node*) malloc(sizeof(Node));
new->coeff = coeff;
new->power = power;
new->next = NULL;
if (!head)
head = new;
else
{
temp = head;
while(temp->next)
temp = temp->next;
temp->next = new;
}
}
int main()
{
Node *listhead = NULL;
append(32,40,listhead);
prinf("%d, %d\n", listhead->power, listhead->coeff);
}