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 ?    11 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 ?    10 Yes 3 No

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

Answer / rajesh

With :: operator

Is This Answer Correct ?    10 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

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

Answer / vijaya

by declaring that method as static we have call it without creating instance of that class.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOPS Interview Questions

Conversion from a basic type to a class type may be achieved using______________

5 Answers   HCL,


I am developing a payroll system mini project.I used file concept in program for reading and writing.When the program is reloading into the memory that is if i execute next time the file was cleaned and adding data from the starting this is my problem.I want to strore the previous data and if i want to add any record that should be next of previous data.Please help me.

0 Answers  


what is difference between class template and template class?

0 Answers  


What is command routing in MFC

1 Answers   GE,


can you give the dynamic polymorphism types?

2 Answers   Wipro,






What is new keyword in oops?

0 Answers  


explain the concepts of oops?

1 Answers  


What is interface? When and where is it used?

0 Answers  


Generally, in all C++ programs, texts are in white colour. Can we change the colour of the text(either input or output or both)? If so, help me out.

1 Answers  


How do you explain polymorphism?

0 Answers  


What is the difference between XML Web Services using ASMX and .NET Remoting using SOAP?

1 Answers  


What are the OOPS concepts?

106 Answers   A1 Technology, Bajaj, CTS, EDS, HP, Infosys, Intel, Microsoft, MNC, Persistent, PlanetSoft, ProConstructor, TCS, Virtusa, Wipro, YSoft Solutions,


Categories