void Append(NODE **head,int i) {
NODE *pTemp = *head;
NODE *newNode = (NODE *)malloc(sizeof(NODE));
newNode ->data = i;
newNode->next = NULL;
if(pTemp == NULL)
*head = newNode;
else {
while(pTemp->next != NULL)
pTemp = pTemp->next;
pTemp->next = newNode;
}
}
No comments:
Post a Comment