Examveda

What will be the output of the following C# code snippet?
class Program
{
    static void Main(string[] args)
    {
        int y = (int)Math.Max(4,2);
        int z = (int)Math.Pow(y, 2);
        Console.WriteLine(z);
        Console.ReadLine();
    }
}

A. 4

B. Compile time error

C. 16

D. 89

Answer: Option C


This Question Belongs to C Sharp Programming >> Miscellaneous In C Sharp

Join The Discussion

Related Questions on Miscellaneous in C Sharp