Subject

    Computer Science

    Topic

    Computer Hardware

    What is a 'stack' in computer architecture?

    a)
    A collection of CPU registers.
    b)
    A region of memory that operates in a Last-In, First-Out (LIFO) manner.
    c)
    A hardware queue for I/O requests.
    d)
    The main instruction set of the processor.

    Explanation

    The stack is a crucial data structure used for managing function calls. When a function is called, its local variables and the return address are 'pushed' onto the stack. When the function finishes, this data is 'popped' off the stack. A special register called the Stack Pointer keeps track of the top of the stack.

    Find Tutors

    View all Tutors