What will be the output of the following C# code? [code] class number { int length = 60; public int number1 {

What will be the output of the following C# code?
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.
Code:
30
B.
Code:
75
C. 80
D. 0
 

Tìm kiếm

Back
Top