#include #include /* ------------------------ List element definition ------------------------ */ struct ListElem { int value; double x1; double x2; double x3; double x4; double x5; double x6; double x7; struct ListElem* next; }; struct ListElem* insertHead(struct ListElem* head, struct ListElem* elem) { elem->next = head; // make "elem" point to "head" return(elem); // return address of new head } struct ListElem* deleteHead(struct ListElem* head) { return(head->next); // return address of new head } int main(int argc, char *argv[]) { struct ListElem* head; // Head of list struct ListElem* p; // Help variable to allocate new list element head = NULL; // Empty list while (1) { p = malloc( sizeof(struct ListElem) ); p->value = 123; head = insertHead( head, p); head = deleteHead( head ); } }