This is a basic stack data structure implemented in C using a modular approach. The project demonstrates how to use dynamic memory, structure-based design, and a Makefile for compilation.
|-> main.c : Contains the main application logic of menu driven for best user interaction |-> stack.c: Contains all necessary operations of stack data structure implemented in that file |-> stack.h: Contains only declaration of implemented operations stack.c |-> makefile: Automate the compilation system
- Create a stack of user-defined size
- Push elements into the stack
- Pop elements from the stack
- Peek at specific index
- Check if stack is full or empty
- Display all elements of the stack
-
Compile the project: just run the command make
-
Run the project: run the command ./stack_app
-
For Clean Up just run the command make clean
This is a beginner-level project aimed at understanding how to:
Structure C projects
Use Makefiles
Work with dynamic memory and modular code
Feel free to fork it and add more data structures or features!
📄 License
This project is open-sourced under the MIT License.