#include // NULL, EXIT_SUCCESS, malloc #include // assert (should normally only be used for testing) typedef struct node_st { int element; struct node_st* next; } Node; Node* Push(Node* head, int e); int main(int argc, char** argv) { Node* list = NULL; list = Push(list, 1); list = Push(list, 2); return EXIT_SUCCESS; } // add node with payload e to front of list head // and return pointer to new node at front of list Node* Push(Node* head, int e) { Node* n = (Node*) malloc(sizeof(Node)); assert(n != NULL); // crashes if false n->element = e; n->next = head; return n; }