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
How to hide the base class functionality in Inheritance?
What is overloading in oop?
What is the importance of oop?
What is a null tree?
How can you overcome the diamond problem in inheritance?
Why is static class not inherited?
Why do pointers exist?
What does and I oop mean in text?
What are the components of marker interface?
What is the advantage of oop over procedural language?
What is a class oop?
write a program to find 2^n+1 ?
Why multiple inheritance is not possible?
What is cohesion in oop?
What is abstraction with example?