Write pseudo code for push in a stack?
Answers were Sorted based on User's Feedback
Answer / sanjeevkumar.v
push it mean INSERT the element to the STACK
| Is This Answer Correct ? | 10 Yes | 14 No |
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 |
What is Hashing and how is it done? Pictorial form?
What is abstraction in oop with example?
What's the full form of STL?
difference between static and non-static variables?
what is oppes
write a c++ code of diagonal matrix.
can main method be overloaded...??? How..????
what is function over loading?
What is the highest level of cohesion?
What is persistence in oop?
In the following declaration of main, "int main(int argc, char *argv[])", to what does argv[0] usually correspond? 1) The first argument passed into the program 2) The program name 3) You can't define main like that
How to create a comment page in C #??