answersLogoWhite

0

A stack is a last in first out (LIFO) data structure. Stacks are typically used in backtracking algorithms where values are popped off the stack in the reverse order they were pushed onto the stack. Procedural programming languages make use of a call stack so that functions can easily return control to their callers -- which is vital when a function may have more than one call site. The calling function pushes the return address onto the call stack and then passes control to the callee function. When the callee has finished its task, the return address is popped off the stack and control returned to that address. In this way, functions can call other functions (including themselves) without losing track of where those calls came from. The call stack is also used to store a function's local variables as well as any arguments that were passed to the function by its caller. The function's exception handlers can also be placed on the stack. When an unhandled exception occurs, the call stack unwinds until a stack frame with a suitable exception handler is located. If the call stack unwinds all the way to the program's entry point (the main function) and there is still no handler, the program terminates with an unhandled exception error.

User Avatar

Wiki User

10y ago

What else can I help you with?

Related Questions

What is a stack and how do you represent a stack in computer memory also discuss basic operation performed on a stack?

A stack is an abstraction of First-in-last-out, or the last in first out. The basic operations (may bear different names) Push or Add Pop or Next


What are the Limitations to effective application of marketing concept in nigeria police force?

application of marketing concept


Give 10 real application of stack?

The real life application of stack are as follows:- 1)Compact Disks(CD) kept in CD Holder 2)The tennis balls in their container 3)Basic OFFICE functions like word processor 4)Books kept one above another 5)Processing of procedure calls and their termination


Five steps how applications programs transfer in and out of ram?

4. List five steps, how application programs transfer in and out of RAM.


What are the different stages in understanding a concept?

The stages in understanding a concept typically include exposure to the concept, comprehension of the basic idea, application of the concept in different contexts, analysis to break down its components, synthesis to combine it with other knowledge, evaluation to assess its validity, and ultimately, mastery where you can teach and apply the concept proficiently.


Concept and application on learning curve theory?

cost accounting concept and application on learning curve theory to be anwered


What are application of stack?

Stacks are primarily used to implement backtracking algorithms.


What are the basic locational and attribute concept embodied in cartography?

what are the basic locational and attributes concept embodied in cartography


What is Basic concept of Linux?

The "basic concept" of Linux is a free and open-source Unix-like kernel.


What is the concept of vital singe.?

its basic concept of tretmet in homeopathy


What are the basic accounting concept and their implication?

basic concepts of accounting


How do you fix stack overflow at line 439?

A lot of stack overflows are caused by buggy programs. See if the application that is causing it (should be in the Event Viewer) has a patch.