******** fig3.51 ********** element_type top( STACK S ) { if( is_empty( S ) ) error("Empty stack"); else return S->stack_array[ S->top_of_stack ]; }