Home / MCQ Bank / Computer
Computer Delegates And Events In C Sharp

What will be the output of the following C# code? public class Generic<T> { public T Field; } class Program { static void Main(string[] args) { Generic<int> g2 = new Generic<int>(); Generic<int> g3 = new Generic<int>(); g2.Field = 8; g3.Field = 4; if (g2.Field % g3.Field == 0) { Console.WriteLine("A"); } else Console.WriteLine("Prints nothing:"); Console.ReadLine(); } }

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option B • A

Related Computer Questions

Which among the following tags belong to Data definition language? ______ level plotting functions that add elements to an existing plot. Which parsing approach is followed by syntax tree? Which of the following analysis helps out to find the effect of variable change? What is a time complexity for finding the longest substring that is common in string S1 and S2 (n1 and n2 are the string lengths of strings s1, s2 respectively)?