View Count: 0
Duration: 26 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 32 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 37 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 23 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 20 mins
Accessed date:
Not Yet Viewed
Post your comment / feedback here
 
 

I believe these set of videos are not in order.

Posted By Shaik Wahab on 16-Aug-2017
Question No: 1 of 26
What is the Order Of Execution of Destructors in Child and Parent Classes? 
Options:
  1. Child class destructor is executed first and then parent class destructor is executed.
  2. Child class destructor is visited first but parent class destructor is executed first.
  3. Parent class destructor is executed first and then child class destructor is executed.
  4. None of the above
View Answer/Explanation:
a
Explanation:
Parent Class Destructor is Executed after Child Class Destructor .This is the reverse order of constructor calls. This is to make sure that the child objects are cleared before the parent objects.

Question No: 2 of 26
Can we use 'base' and 'this' in the same Constructor? 
Options:
  1. Yes
  2. No
View Answer/Explanation:
b
Explanation:
‘base’ keyword is used to call the constructor of parent class from the child class ,’this’ is used to call the constructor from the same class.

Question No: 3 of 26
What is the advantage of inheritance? 
Options:
  1. Generalization
  2. Extensibillity
  3. Reusability
  4. All the above
View Answer/Explanation:
d
Explanation:
The advantages of Inheritance are Generalization, Extensibility and Reusability. Example : A calculator is a Generalized form of mathematical operations where as a scientific calculator is an Extended and specific form.

Question No: 4 of 26
Does DOTNET support Multiple Inheritance? 
Options:
  1. Yes
  2. No
View Answer/Explanation:
b
Explanation:
There are two types of Inheritance 1. Implementation Inheritance 2. Interface Inheritance DOTNET doesn't support Multiple Implementation Inheritance but supports Multiple Interface Inheritance. When multiple inheritance is used, there might be an ambiguity if two similar methods exist in the classes that are inherited from.

Question No: 5 of 26
What will be the output of the program?
  class CA

{

     protected  int  M1=10;

}

class CB : CA

{

     void Foo()

     {

         CA a = new CA();

        Console.WriteLine( a.M1); 

     }

} 
Options:
  1. Compiletime error
  2. Runtime Error
  3. 10
  4. 0
View Answer/Explanation:
a
Explanation:
The protected member of parent class cannot be accessed in child class method using reference variable of type parent.

Question No: 6 of 26
Inheritance between two classes is based on which of the relationship? 
Options:
  1. Is a
  2. Has a
  3. Instance of
  4. Type of
View Answer/Explanation:
a
Explanation:
Inheritance depend upon “is a” relationship Examples- Car is a Vehicle Faculty is a Person Student is a Person Mango is a Fruit Chair is a Furniture Scientific Calculator is a Calculator

Question No: 7 of 26
Protected members are accessible only within the same class and in ________ . 
Options:
  1. Non-derived, and Derived
  2. Only in Derived
  3. Non-derived.
  4. None of the above.
View Answer/Explanation:
b
Explanation:
Protected members are accessible only within the same class and in derived classes.

Question No: 8 of 26
)     class CParent

{

        public int PubA;

        private int PriA;

        protected int ProA;   

} 

class CChild:CParent

{

      public int pubB;

}

When an object of CChild is created how many data members are allocated memory? 
Options:
  1. 3
  2. 2
  3. 4
  4. 1
View Answer/Explanation:
c
Explanation:
All members of child class and parent class irrespective of their access specifier are allocated memory.

Question No: 9 of 26
Which of the following is correct order of execution of constructor? 
Options:
  1. Child Class constructor first and then parent class
  2. Parent class constructor first and then child class
  3. Both will execute together.
  4. Depending on the class intiantiaited.
View Answer/Explanation:
b
Explanation:
The child class constructor has the opportunity to run the initialization code after the parent constructor is executed to be able to overwrite any values set by the parent.

Question No: 10 of 26
class CA

{

    public int PubA;

    private int PriA;

    protected int ProA;

    public CA(int a, int b, int c)

    {

        this.PriA = a;

        this.ProA = b;

        this.PubA = c;

    }

}

class CB : CA

{

    public int pubB;

    public CB() : _____

    { }

}

Fill in the above blank 
Options:
  1. base()
  2. this()
  3. this(1,2,3)
  4. base(1,2,3)
View Answer/Explanation:
d
Explanation:
Because the base class doesn't have default constructor, it must explicitly link to parametrized constructor of parent class.

  1