Which among the following is correct for following code ?
abstract class A
{
public Int a;
public void disp();
};
class B:public A
{
public: void dis()
{
court<<a;
}
};
class C:private A
{
public void incr()
{
a++;
}
}
void main()
{
B b.disp();
}
- Compile time error
- Runtime error
- Program runs and o/p is 0
- Program runs and o/p is garbage value
(a).Compile time error
need an explanation for this answer? contact us directly to get an explanation for this answer