AmbitionBox

Discover Best Places to work in India

C# Programming

C# Programming Questions and Answers

Showing 11 - 11 of 11 questions

11

What will be the output of the following snippet of code?

class number

{

     int length =50;

     publicint number1

     {

          get

          {

               return length;

          }

          set

          {

               length =value;

          }

     }

}

class Program

{

     publicstaticvoid Main(string[] args)

     {

          number p =new number();

          p.number1= p.number1+40;

          int k = p.number1*3/9;

          Console.WriteLine(k);

          Console.ReadLine();

     }

}

 

 

 

 

a

0

b

180

c

30

d

Compile time error

correct answer c

Answer: Option (C)

Select a company to compare with

vs

Similar Companies