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
Why interface is used?
What is stream in oop?
What are the benefits of interface?
What is class and object in oops?
Is oop better than procedural?
design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)
Why is polymorphism used?
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?
What is object in oop?
What is solid 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?
assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).
what is difference between class template and template class?
Get me a number puzzle game-program
Which is not an object oriented programming language?