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 procedural programming and oops?
What is the difference between a constructor and a destructor?
What is destructor give example?
What is polymorphism oop?
What does and I oop mean in text?
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash
What is balance factor?
Which is not an object oriented programming language?
Can you explain polymorphism?
What is polymorphism used for?
Can an interface inherit a class?
What is new keyword in oops?
Why interface is used?
What does I oop mean?
What polymorphism means?