In data structures, what does push do?
Show answer
Correct answer B
In stack data structures, push is used to add an element. The element is added to the top of the stack (end of the structure). The opposite operation is pop, which removes the top element. Stacks follow the LIFO (Last In, First Out) principle. Push helps in storing data temporarily during computations and function calls.