Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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 difference between data abstraction and encapsulation?

0 Answers  


143.what is oops principles?

10 Answers  


what is the difference between virtual function and destoctor?

1 Answers  


Can you inherit a private class?

0 Answers  


who is the father of OPPS

4 Answers   Infosys, TCS,


Why it is called runtime polymorphism?

0 Answers  


What is multiple inheritance?

9 Answers   TCS,


write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory

0 Answers  


Can you explain polymorphism?

0 Answers  


Should you protect the global data in threads? Why or why not?

2 Answers   IBM,


Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.

0 Answers  


program for insertion ,deletion,sorting in double link list

0 Answers  


Categories