data_structures
Functions
stack_peek.c File Reference
#include "stack.h"
+ Include dependency graph for stack_peek.c:

Go to the source code of this file.

Functions

void * stack_peek (const t_stack *stack)
 Returns the item most recently added to this stack, without removing it. More...
 

Function Documentation

◆ stack_peek()

void* stack_peek ( const t_stack stack)

Returns the item most recently added to this stack, without removing it.

Returns
the item most recently added, or NULL if the stack is empty.

Definition at line 16 of file stack_peek.c.