Which of the following statement is correct with respect to the below code snippet?
namespace MyConsoleApplication
{
class index
{
protected int count;
public index()
{
count = 0;
}
}
class index1: index
{
public void increment()
{
count = count +1;
}
}
class MyProgram
{
static void Main(string[] args)
{
index1 i = new index1();
i.increment();
}
}
}
1.count should be declared as public if it is to become available in the inheritance chain.
2.count should be declared as protected if it is to become available in the inheritance chain.
3.While constructing an object referred to by i firstly constructor of index class will be called followed by constructor of index1 class.
4.Constructor of index class does not get inherited in index1 class.

The subclass can inherit only the member variable and function not constructor if you want call the constructor of base class. You must have to create the object first of the base class.
When we declare as protected, it will availabe to subclass, it take intial value as zero for count variable, then it get increment.