Q71
What will be the output of the following C# code snippet? public class Generic Stack stk = new Stack (); public void push(T obj) stk.Push(obj); public T pop() T obj = stk.Pop(); return obj; class Program static void Main(string[] args) Generic g = new Generic (); g.push("C++"); Console.WriteLine(g.pop() + " "); Generic g1 = new Generic (); g1.push(20); Console.WriteLine(g1.pop()); Console.ReadLine();
A.
C++
B.
20
C.
C++
20
Answer20
D.
0
Answer: Option C
Solution
Answer: Option C
No explanation is given for this question Let's Discuss on Board