Write pseudo code for push in a stack?

Answers were Sorted based on User's Feedback



Write pseudo code for push in a stack?..

Answer / sanjeevkumar.v

push it mean INSERT the element to the STACK

Is This Answer Correct ?    10 Yes 14 No

Write pseudo code for push in a stack?..

Answer / 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

More OOPS Interview Questions

what is object slicing

3 Answers   TCS,


Can private class be inherited?

0 Answers  


What is Iteration Hierarchy? What is what is Object behavioral concept?

1 Answers  


What is the concept of object oriented program?

6 Answers  


What do you mean by inline function?

6 Answers  






what is difference between objects and function

3 Answers  


which is platform independent device used in computers

2 Answers  


which feature are not hold visual basic of oop?

0 Answers   Ignou,


What is multilevel inheritance in oop?

0 Answers  


what is the usage of clas templates

5 Answers  


what is the difference between class and object?

9 Answers  


Get me a number puzzle game-program

0 Answers  


Categories