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

Function push_2

S-Stack/twoStackArray.cpp:28–36  ·  view source on GitHub ↗

------------This function is used to push elements in stack 2-------------------------------*/

Source from the content-addressed store, hash-verified

26
27/*------------This function is used to push elements in stack 2-------------------------------*/
28void push_2(int data){
29
30 if(top_1 < top_2 - 1){
31 arr[--top_2] = data;
32 }
33
34 else
35 cout << "Stack Overflow" << endl;
36}
37
38
39/*------------This function pops the element from the stack 1----------------------------------*/

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected