Which of the following statements are correct about the Stack colle

Loading

โœช Choose the correct option.

Which of the following statements are correct about the Stack collection?

  1. It can be used for evaluation of expressions.
  2. All elements in the Stack collection can be accessed using an enumerator.
  3. It is used to maintain a FIFO list.
  4. All elements stored in a Stack collection must be of similar type.
  5. Top-most element of the Stack collection can be accessed using the Peek() method.

A. 1, 2 and 5 only
B. 1 and 2 only
C. 5
D. 2 and 5 only

Leave a Comment