Data Structures Lerax 1.0.0
Essential Data Structures for C language
Loading...
Searching...
No Matches
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

◆ Stack

typedef struct stack Stack

Function Documentation

◆ stack_create()

Stack * stack_create ( void )

Create a new stack

◆ stack_empty()

int stack_empty ( Stack * s)

Verify is stack is empty

◆ stack_free()

void stack_free ( Stack * s)

Free memory of the stack structure

◆ stack_odds()

int stack_odds ( Stack * s)

Count the elements which is odd

◆ stack_pop()

int stack_pop ( Stack * s)

Pop a element from top of stack

◆ stack_print()

void stack_print ( Stack * s)

Print the elements of stack without a newline

◆ stack_println()

void stack_println ( Stack * s)

Print the elements of stack with a newline on the end

◆ stack_push()

void stack_push ( Stack * s,
int data )

Push a new element on top of stack

◆ stack_top()

int stack_top ( Stack * s)

Get the element of top without removing