Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: SQL Server
Expertise: Beginner
Oct 29, 1999

Explaining Stacks

Question:
Could you please give me a simple explanation to what stacks are? How do they work and what are their related features?

Answer:
Stacks are temporary resting places for variables or code in memory. They work like those dish dispensers in large cafeterias: when you put (i.e., "push") something on the stack, it sits on the top until something else gets put on top if it. If you want to get something off (i.e., "pop") the stack, you have to remove everything that is ahead (on top) of it first, until you reach your item.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date