Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


Can we call a base class method without creating instance?

Answers were Sorted based on User's Feedback



Can we call a base class method without creating instance?..

Answer / nk

Onlu static methods can be called without creating any
instance of the class.

Is This Answer Correct ?    23 Yes 1 No

Can we call a base class method without creating instance?..

Answer / amit sharma

U've to derieve the class first and then when u instanciate
the derieved class. Then :-

U can call it using derieved class object or in a derieved
class member function depending upon base class fun's acess
specifer and inheritence specifier.

Is This Answer Correct ?    10 Yes 1 No

Can we call a base class method without creating instance?..

Answer / 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 ?    6 Yes 2 No

Can we call a base class method without creating instance?..

Answer / rajesh

With :: operator

Is This Answer Correct ?    7 Yes 4 No

Can we call a base class method without creating instance?..

Answer / sg

Definitely,we have declare base class as static

Is This Answer Correct ?    3 Yes 2 No

Post New Answer



More OOPS Interview Questions

OOP'S advantages of inheritance include:

1 Answers   Infosys,


Is enum a class?

0 Answers  


What are the 5 oop principles?

0 Answers  


What is a function in oop?

0 Answers  


What is an advantage of polymorphism?

0 Answers  






What are the four main oops concepts?

0 Answers  


difine hierarchical inheritance.

9 Answers   ASD Lab, TCS,


what is mean by design pattern

4 Answers  


what is the technical or oop name of object?

1 Answers  


What is encapsulation in oops?

0 Answers  


Name a typical usage of polymorphism

3 Answers  


What is basic concept of oop?

0 Answers  






Categories