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

Function main

11. Stack/Stack Using Array.cpp:72–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70 }
71};
72int main()
73{
74 Stack s ;
75 s.push(1);
76 s.push(2);
77 s.push(3);
78 s.push(4);
79 s.push(5);
80 s.push(6);
81 s.push(7);
82 s.push(8);
83 cout<<"Size of Stack :- "<<s.Size()<<endl;
84 cout<<s.top()<<endl;
85 s.pop();
86 cout<<s.top()<<endl;
87 s.pop();
88 cout<<s.top()<<endl;
89 s.pop();
90 cout<<s.top()<<endl;
91 cout<<s.top()<<endl;
92 s.pop();
93 cout<<s.top()<<endl;
94 s.pop();
95 cout<<s.top()<<endl;
96 s.pop();
97 cout<<s.top()<<endl;
98 s.pop();
99 cout<<s.top()<<endl;
100 return 0 ;
101}

Callers

nothing calls this directly

Calls 4

SizeMethod · 0.80
pushMethod · 0.45
topMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected