What is the output of the following code snippet?

class Display
{
    static Display()
    {
        int number1 = 8;
        Console.WriteLine(number1);
    }
    public Display(int number2)
    {
        int number3 = 10;
        Console.WriteLine(number3);
    }
}


class Program
{
    public static void Main(string[] args)
    {
        Display obj = new Display(0);
    }
}

 

10 10
0 10
8 10
8 8
Verified Answer
Correct Option - c

To get all Infosys Certified CSharp Programmer Exam questions Join Telegram Group https://bit.ly/infy_premium_group

Telegram

We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.

Qtr No. 213, New Town Yehlanka Indore 454775

admin@prepflix.in

Updated on Tue, 1 Jul 2025