Difference between over loading and over ridding?

Answers were Sorted based on User's Feedback



Difference between over loading and over ridding? ..

Answer / vasanth

Method Overloading is the method name looks similar but
return type and method arguement (inside parameter) differs.

Method Overiding is that the method name, arguements and
return type seems similar on both base and derived class.
(Sometimes we will add the additional code to the derived
class method also).

Is This Answer Correct ?    1 Yes 3 No

Difference between over loading and over ridding? ..

Answer / varsha vilas kalebag

over loading is nothing but

Is This Answer Correct ?    2 Yes 7 No

Post New Answer

More OOPS Interview Questions

officer say me - i am offered to a smoking , then what can you say

0 Answers  


What is abstraction encapsulation?

0 Answers  


What is constructor overloading in oop?

0 Answers  


What is a function in oop?

0 Answers  


tell about copy constructor

3 Answers   Siemens,






Why is polymorphism used?

0 Answers  


What is a template?

7 Answers  


difference between abstraction and encapsulation with progarammatic eg. hi,just recently i went for an interview .The interviewer asked what is the difference between abstraction and encapsulation with programmatic eg. I gave the answer as encapsulation mean hiding the relevant data which is not useful for the user, eg a electric fan .hiding the information how the electricity is converted into machanical energy. abtraction showing only the relevant data to the user eg electric fan. it look ,its color ,it design etc only relevant data. Then the interviewer asked me, give me some programmic eg .I Said Let assume a web form having control like textbox,button etc. The user can view textbox,button etc this is the eg of abstraction and when the user click on the button how he is redirected is not known by the user is the eg of the encapsulation. Am I Correct .was the answer given by me is perfect .now i am planing to go for an another interview should i give the same answer.IF not please suggest me a better answer.with some good eg Please help

1 Answers  


class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash

0 Answers  


In c++ there is only virtual destructors, no constructors. Why?

4 Answers   IBM, Polaris,


what is the advantage in software? what is the difference between the software developer and Engineer

1 Answers  


Can a destructor be called directly?

0 Answers  


Categories