Posts

Showing posts from October, 2021

Write a program to implement a stack that stores the names of students in the class.

Image
                Program Code with Output     Write a program to implement a stack that stores the names of students in the class.                                                                                                                          Program Code #include <iostream> #include <stack> using namespace std;    int main() {   stack<string> mystack;       mystack.push("Daleep Singh");       mystack.push("Kunal Saini");       mystack.push("Yogesh Kumar");       mystack.push("Ankush Paul"); ...