Data Structures UFC  1.0.0
Essential Data Structures for C language
Typedefs | Functions
stack.h File Reference

Go to the source code of this file.

Typedefs

typedef struct stack Stack
 

Functions

Stackstack_create (void)
 
int stack_empty (Stack *s)
 
void stack_push (Stack *s, int data)
 
int stack_pop (Stack *s)
 
void stack_print (Stack *s)
 
void stack_println (Stack *s)
 
void stack_free (Stack *s)
 
int stack_top (Stack *s)
 
int stack_odds (Stack *s)
 

Typedef Documentation

typedef struct stack Stack

Function Documentation

Stack* stack_create ( void  )

Create a new stack

int stack_empty ( Stack s)

Verify is stack is empty

void stack_free ( Stack s)

Free memory of the stack structure

int stack_odds ( Stack s)

Count the elements which is odd

int stack_pop ( Stack s)

Pop a element from top of stack

void stack_print ( Stack s)

Print the elements of stack without a newline

void stack_println ( Stack s)

Print the elements of stack with a newline on the end

void stack_push ( Stack s,
int  data 
)

Push a new element on top of stack

int stack_top ( Stack s)

Get the element of top without removing