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
when to use 'mutable' keyword and when to use 'const cast' in c++
How long to learn object oriented programming?
What are the three main types of variables?
Explain the advantages of inheritance.
What is and I oop mean?
What does it mean when someone says I oop?
explain sub-type and sub class? atleast u have differ it into 4 points?
What is encapsulation process?
What is property in oops?
What is encapsulation and abstraction? How are they implemented in C++?
String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?
What are objects in oop?
What is the benefit of oop?
Why do we use oop?
What is a function in oop?