C Program Copy of a stack Write a function stack copy stack

C++ Program:

Copy of a stack. Write a function stack *copy (stack *s) which returns a copy of the stack.

Solution

Answer :-

  // stack::top  #include <iostream>       // std::cout  #include <stack>          // std::stack    int main ()  {    std::stack<int> mystack;      mystack.push(10);    mystack.push(20);      mystack.top() -= 5;      std::cout << \"mystack.top() is now \" << mystack.top() << \'\ \';      return 0;  }  
C++ Program: Copy of a stack. Write a function stack *copy (stack *s) which returns a copy of the stack.SolutionAnswer :- // stack::top #include <iostream>

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site