– The following operation are performed on an empty stack “A”PUSH(1)PUSH(2)POPPUSH(5)PUSH(6)POPWhat will stack contain after these operations? Note: The top of the stack is underlined in the option below)
A. 5 6
B. 1 2
C. 1 5
D. 6 6
Answer:C
– The following operation are performed on an empty stack “A”PUSH(1)PUSH(2)POPPUSH(5)PUSH(6)POPWhat will stack contain after these operations? Note: The top of the stack is underlined in the option below)
A. 5 6 B. 1 2 C. 1 5 D. 6 6
Explanation: stack used LIFO (Last In First Out) technique. All elements are insertedfrom topof stack.