No products in the cart.

Develop a program for push operation …

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

Develop a program for push operation in stack using c++
  • 1 answers

Sia ? 5 years, 2 months ago

#include <iostream>

#include <stack>

using namespace std;

int main()

{

    // Empty stack

    stack<int> mystack;

    mystack.push(0);

    mystack.push(1);

    mystack.push(2);

    // Printing content of stack

    while (!mystack.empty()) {

        cout << ' ' << mystack.top();

        mystack.pop();

    }

}

http://mycbseguide.com/examin8/

Related Questions

What are called tokens
  • 2 answers

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App