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
Can private class be inherited?
Why do we use polymorphism in oops?
Explain virtual inheritance?
What is encapsulation c#?
What polymorphism means?
What is polymorphism in oops with example?
What is a null tree?
What makes a language oop?
What exactly is polymorphism?
What is variable example?
What is difference between inheritance and polymorphism?
Can static class have constructor?
What does sksksk mean in text slang?
What are oops methods?
How do you achieve polymorphism?