1.

What will be the output of the given code snippet?
 class a { public void x(int p, double k) { Console.WriteLine("k : csharp!"); } }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(40); Console.WriteLine(g.pop()); Console.ReadLine(); } }

A. 0
B. Runtime Error
C. 40
D. Compile time Error
Answer» D. Compile time Error


Discussion

No Comment Found