SHARE
SPREAD
HELP

The Tradition of Sharing

Help your friends and juniors by posting answers to the questions that you know. Also post questions that are not available.


To start with, Sr2Jr’s first step is to reduce the expenses related to education. To achieve this goal Sr2Jr organized the textbook’s question and answers. Sr2Jr is community based and need your support to fill the question and answers. The question and answers posted will be available free of cost to all.

 

#
Authors:
Linda Null ,julia Lobur
Chapter:
Marie An Introduction To A Simple Computer
Exercise:
Review Of Essential Terms And Concepts
Question:38 | ISBN:9780763704445 | Edition: 3

Question

38. What is a stack? Why is it important for programming?

TextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbook

Answer

Stack :

A stack is a storage device that stores information in such a manner that the item stored last is the first item retrieved. There are some operations in stack .They are PUSH and POP.

  • The stack in digital computers is essentially a memory unit with an address register that can count only.
  • The register that holds the address for the stack is called a stack pointer (SP) because its value always points at the top item in the stack. 
  • The physical registers of a stack are always available for reading or writing. It is the content of the word that is inserted or deleted.

Stack Is Important in Programming as they provide a unique way to work with contiguous memory. Very similar to Arrays and Lists, Stacks provide a way for users to access different pieces of contiguous data in a Last In First Out manner.

 

 

0 0

Discussions

Post the discussion to improve the above solution.