Nguyễn Pháp
New member
For the following code, choose the correct option.
A. The instances can be created only in subclasses
B. The instances can be created only in main() function
C. The instances can be created only in parent class
D. The instances can be created anywhere in the program
Code:
class A
{
int marks;
protected : A()
{
marks=100;
}
public : A( int x)
{
marks=x;
}
};
B. The instances can be created only in main() function
C. The instances can be created only in parent class
D. The instances can be created anywhere in the program