Examveda

What will be the output of the following C# code?
class number
{
    int length = 60;
    public int number1
    {
        get
        {
            return length;
        }
    }
}
class Program
{
    public static void Main(string[] args)
    {
        number p = new number();
        int l;
        l = p.number1 + 40;
        int k = l * 3 / 4;
        Console.WriteLine(k);
        Console.ReadLine();
    }
 }

A. 30

B. 75

C. 80

Answer: Option B


Join The Discussion

Related Questions on Exception Handling in C Sharp