Can we call a base class method without creating instance?
Answer Posted / sanjay makwana, puna
e.g. class X
{
int x;
X()
{
cout << "X";
}
public :
static void fun()
{
cout << "fun";
}
};
you may called like
X::fun();
Is This Answer Correct ? | 10 Yes | 3 No |
Post New Answer View All Answers
Why is static class not inherited?
Advantage and disadvantage of routing in telecom sector
Why multiple inheritance is not possible?
write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.
Why it is called runtime polymorphism?
What are main features of oop?
What is multilevel inheritance?
Why we use classes in oop?
what is the drawback of classical methods in oops?
Is react oop?
What is inheritance in simple words?
How do you use inheritance in unity?
Why is polymorphism needed?
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?