nerdexam
Microsoft

98-361 · Question #392

98-361 Question #392: Real Exam Question with Answer & Explanation

The correct answer is C. 7, 50. See the full explanation below for the reasoning.

Question

You are developing an application that uses the Stack data structure. You write the following code: Stack first = new Stack(); first.Push(50); first.Push(45); first.Pop(); first.Push(11); first.Pop(); first.Push(7); What are the contents of the stack, from top to bottom, after these statements are executed?

Options

  • A7, 11, 50
  • B7, 45
  • C7, 50
  • D7, 11, 45

Community Discussion

No community discussion yet for this question.

Full 98-361 Practice