From d47d78f2fea7a468f66b651acbda961d6011f1bb Mon Sep 17 00:00:00 2001 From: 22203011 <22203011@pdc.jiit> Date: Sat, 6 Jan 2024 10:53:09 +0530 Subject: [PATCH] Add Comments for functions --- Stacks/Stack_using_array.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Stacks/Stack_using_array.cpp b/Stacks/Stack_using_array.cpp index dc8d7bd8..00c0f60b 100644 --- a/Stacks/Stack_using_array.cpp +++ b/Stacks/Stack_using_array.cpp @@ -1,6 +1,7 @@ #include using namespace std; int stack[100], n=100, top=-1; +//function to add or push element in stack void push(int val) { if(top>=n-1) @@ -11,6 +12,7 @@ void push(int val) stack[top]=val; } } +//function to delete or pop element in stack void pop() { if(top<=-1)