A stack is a set of hardware registers or a reserved amount of main memory that is used for arithmetic calculations or for keeping track of internal operations. Stacks are used to keep track of the sequence of routines that are called in a program. Stacks usually work on a last-in-first-out basis in order to accomplish this. The last item, or address, placed (pushed) onto the stack is the first item removed (popped) from the stack.
No comments:
Post a Comment