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

Function push_1

S-Stack/twoStackArray.cpp:16–24  ·  view source on GitHub ↗

----------------This function is used to push elements into stack 1--------------------------*/

Source from the content-addressed store, hash-verified

14
15/*----------------This function is used to push elements into stack 1--------------------------*/
16void push_1(int data){
17
18 if(top_1 < top_2 - 1){
19 arr[++top_1] = data;
20 }
21
22 else
23 cout << "Stack Overflow Error" << endl;
24}
25
26
27/*------------This function is used to push elements in stack 2-------------------------------*/

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected