English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

a)pop,push
b)top,push
c)pop,top
d)top,bottom

2006-11-21 22:52:04 · 3 answers · asked by venkata reddy s 1 in Computers & Internet Programming & Design

3 answers

pop and push are the two operations...

top and bottom are actually locations where you store elements. we can only access items at the 'top' of the stack. If you want to insert any item, you use the 'push' operation. This will insert the item at the top of the stack. And when you want to retrieve the element at the top of the stack you use 'pop'

2006-11-21 23:11:41 · answer #1 · answered by Angellic 2 · 0 0

option A. pop, and push.
stack is a structure to store data, such a way that last element entered will be the first one if you try to get data.
Operation push means adding the data, in the stack, and pop means taking out the elements.
The operation top is seldom used, which means just getting the value of the top element. There is one more operation named empty, to check if the stack is empty or not.

A sample class representation is

class _stack
{
private :
int a[30];
int index;

public:
_stack();
void push(int);
int pop();
int top();
bool empty();
}

This is the stack which will store the elements of type it.

2006-11-22 08:02:04 · answer #2 · answered by manoj Ransing 3 · 0 0

There isn't a question here.

2006-11-22 06:57:22 · answer #3 · answered by Anonymous · 0 0

fedest.com, questions and answers