#include "stack8.h" #include #include struct stack { void *element; stack next; }; stack stack_create(void) { return NULL; } stack stack_push(stack s, void *element) { stack temp = malloc(sizeof(struct stack)); temp -> element = element; temp -> next = s; return temp; } stack stack_pop(stack s) { return s -> next; } int stack_empty(stack s) { return s == NULL; } void * stack_top(stack s) { assert(!stack_empty(s)); return s -> element; }