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?
What is polymorphism used for?
What is object and example?
What is encapsulation oop?
What is ambiguity in inheritance?
What is oops and why we use oops?
What is a null tree?
What are the two different types of polymorphism?
What do you mean by overloading?
What is abstraction in oop?
What is the difference between encapsulation and polymorphism?
What causes polymorphism?
What are the 3 principles of oop?
What is polymorphism oop?
What are the data types in oop?