34.
Select the wrong statement about 'ref' keyword in C#?

36.
What will be the output of the following C# code?
class sample
{
    int i;
    double k;
    public sample (int ii, double kk)
    {
        i = ii;
        k = kk;
        double j = (i) + (k);
        Console.WriteLine(j);
    }
    ~sample()
    {
        double j = i - k;
        Console.WriteLine(j);
    }
}
  class Program
  {
      static void Main(string[] args)
      {
          sample s = new sample(8, 2.5);
          Console.ReadLine();
      }
  }

38.
Correct statement about constructor overloading in C# is?

39.
Select the correct statement among the given statements?

40.
What will be the output of the following C# code?
class maths 
{
    int fact(int n) 
    {
        int result;
        if (n == 1)
        return 1;
        result = fact(n - 1) * n;
        return result;
    }
} 
class Output 
{
    static void main(String args[]) 
    {
        maths obj = new maths() ;
        Console.WriteLine(obj.fact(4)*(3));
    }
}

Read More Section(Classes and Objects in C Sharp)

Each Section contains maximum 100 MCQs question on Classes and Objects in C Sharp. To get more questions visit other sections.