Skip to content

Latest commit

 

History

History
12 lines (10 loc) · 638 Bytes

README.md

File metadata and controls

12 lines (10 loc) · 638 Bytes

Generic-Stack-In-C

Implemented stack data structure that supports all the basic data type in C. It can be included as a header file and can be used in a similar manner as the stack in C++.

  • stack(T) => Determines type of stack i.e T
  • stac_init(&V) => creates the stack V of type T
  • stack_get(&V,int index) => gets the value from the index i.e found function
  • stack_top() => gets the value from the top of stack
  • stack_size() => gets the size of stack
  • stack_set(&V,int index,T data) => changes the value at index
  • stack_push(&V,val) => pushes val at the top of stack
  • stack_pop(&V) => pops out the val from the top of stack