lenelex.com
Home
Quizzes
Games
Register
Log in
Question 1 of 20
What is the output of the following code snippet?
var stack = new Stack<int>(new[] { 1, 2, 3 }); foreach (int value in stack) { Console.Write($"{value} "); }
A. 1 2 3
B. 3 1 2
C. 3 2 1
D. 1 3 2
Links:
Stack Class
Stack<T> Class
Collections and Data Structures