MCPcopy Create free account
hub / github.com/Lakhankumawat/LearnCPP / pop_1

Function pop_1

S-Stack/twoStackArray.cpp:40–49  ·  view source on GitHub ↗

------------This function pops the element from the stack 1----------------------------------*/

Source from the content-addressed store, hash-verified

38
39/*------------This function pops the element from the stack 1----------------------------------*/
40int pop_1(){
41
42 if(top_1 >= 0)
43 return arr[top_1--];
44
45 else{
46 cout << "Stack Underflow" << endl;
47 return -1;
48 }
49}
50
51
52/*-------------This function pops the element from the stack 2---------------------------------*/

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected