The sequence's insert member function normally puts a new item before the current item. What should insert do if there is no current item?A) The insert precondition is violated.B) The new item is put at the beginning of the sequence.C) The new item is put at the end of the sequence.D) None of the above.

Respuesta :

Answer:

B) The new item is put at the beginning of the sequence

Explanation:

The stack data structure is an example of the type for insert method as the current items are replaced at the top by a new item and the previous items move down the stack. If there no current item in the stack, the new item is put in the first index (beginning point) of the stack data structure.