Answer Posted / surya8273@gmail.com
push means inserting an element on to the top of the stack.
lets define array of size 10,
int a[10]
Top<== -1 // stack is empty now.
Push(x)// x is a element to be push.lets take x=4
{
top<== top+1
// top will initialize to 1,now the top will be address to the 0 th index of array.//
a[Top]<== x
// insert x in to the 0th index of array(a[0]<== 4)//
}
| Is This Answer Correct ? | 0 Yes | 4 No |
Post New Answer View All Answers
What is the difference between a constructor and a destructor?
What is polymorphism give a real life example?
Why is oop useful?
What is interface? When and where is it used?
Why do while loop is used?
What is multilevel inheritance explain with example?
Why do we use encapsulation in oops?
What is oops and its features?
What are main features of oop?
what is the drawback of classical methods in oops?
Where You Can Use Interface in your Project
Explain the concepts involved in Object Oriented programming.
What is protected in oop?
What are objects in oop?
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.