which of the below options are true about a stack operations in c?
i. push function will insert new element at the end
ii. pop function will remove the element from last.
i & ii
option i is right, but option ii pop removes the first element not last.
push inserts element at the end, pop removes element from end/last. That’s why it is last in first out. Who ever enters last they will be removed first.
Back To Top