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 |
why c++ is called OOPS? waht is inherutance? what is compiler?
What is overloading in oops?
IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?
how to swap the variables without using temp and operators
What is differance between Abstract and Interface
Can a destructor be called directly?
define oops with class and object
Why do we need oop?
Input: enter the value:1234 output: 1 2 3 4 write a program to get above output.....
4 Answers Bally Technologies, IBM, SoftSol,
Example for 4 pillar of oops like, Inheritance,Poly,Abstraction,Encabsulation ?
to remove the repeated numbers from the given . i.e.., if the input is 12233 output should of 123
What is a class?
32 Answers Infosys, TCS, Thylak,