diff --git a/Stacks_Using_Queues/stacks using static array.cpp b/Stacks_Using_Queues/stacks using static array.cpp new file mode 100644 index 0000000000..d2b33e8050 --- /dev/null +++ b/Stacks_Using_Queues/stacks using static array.cpp @@ -0,0 +1,53 @@ +#include +using namespace std; + +class stack +{ +private: + int top; +public: + stack() + { + top=-1; + } + int arr[10]; + void push(int n) + { + if(top>=10-1) + { + cout<<"stack overflow"<