MCPcopy Create free account
hub / github.com/SR-Sunny-Raj/Hacktoberfest2021-DSA / push

Method push

11. Stack/ArrayImplementStack.cpp:17–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15 }
16
17 void push(int x)
18 {
19 if(top==cap-1)
20 {
21 cout<<"Stack full"<<endl;
22 return;
23 }
24 top++;
25 arr[top]=x;
26 }
27
28 int pop()
29 {

Callers 1

mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected