- World's Largest Collection of Interview Questions
Start Your Own website Now
Sponsored Links

Interview Questions
Our Services

Get 9,000 Interview Questions & Answers in an eBook.

  • 9500+ Pages
  • 9000 Question & Answers
  • All Tech. Categories
  • 14 MB Content

    Get it now !!

    Send your Resume to 6000 Companies

    Question :
    What is function overriding?

    Category Operator Overloading in C++ Interview Questions
    Rating (0.4) By 1575 users
    Added on 7/19/2006
    Views 3541
    Rate it!

    The function overloading is the technique in which you can make the function with more than one name but only if you will change the paramaters or the number of the paramaters.

    function overriding is one in which functions have the same name and same number,type of arguments.. its only the implementations that differs.. they are accessed based on the object of the class being called

    Posted by: dharani    

    Contact dharani Contact dharani

    function overloading is function name is same and parameter same but deffination of the function is deffrent .fuction perform the action is deffrent -deffrent <br>example-<br>class abc<br>{<br>int sum;<br><br>public int sum(int i, int j)<br>{<br>sum=i+j;<br>return(sum);<br>}<br>int mul;<br>public int sum(int i, int j)<br>{<br>mul=i*j;<br>return(mul);<br>}}<br>{<br>

    Posted by: ashish awasthi    

    Contact ashish awasthi Contact ashish awasthi

    In OOAD we can give an idea of one interface and multiple defination

    Posted by: srividya    

    Contact srividya Contact srividya

    it is a concept in which multiple function acess same data & information but different argument

    Posted by: rishi    

    Contact rishi Contact rishi

    class abc<br>{<br>int sum;<br><br>public int sum(int i, int j)<br>{<br>sum=i+j;<br>return(sum);<br>}<br>int mul;<br>public float sum(int i, int j)<br>{<br>mul=i*j;<br>return(mul);<br>}}<br>{<br><br><br>

    Posted by: Shyam Parmar    

    Contact Shyam Parmar Contact Shyam Parmar

    Function over loading means two functions will have same name but they differ in the number or type of arguments. <br><br>Whereas function overriding means two functions will have same name , type and number of arguments. Typically these two functions will be in different classes (base and derived for example).

    Posted by: Saravanan    

    Contact Saravanan Contact Saravanan

    Function Overloading is defining more than one class with same function name but with diiferent number of arguments are with different datatypes of arguments<br><br><br>Example:<br>class sample<br>{<br>int s,m,d;<br>int sum(int a,int b)<br>{<br>s=a+b;<br>return(s);<br>}<br>int sum(int a,int b, int c)<br>{<br>m=a*b;<br>return(m);<br>}<br>float sum(float a,float b)<br>{<br>d=a/b;<br>returb(d);<br>}<br>}

    Posted by: Tamilarasan    

    Contact Tamilarasan Contact Tamilarasan

    Function overloading is the feature of C++ where two functions can have same but different arguments for example <br><br>Class CFunctionOverload {<br><br>Public:<br>void OverloadFunction(void);<br>void OverloadFunction(int param1);<br>void OverloadFunction(int param1, int param2);<br>void OverloadFunction(float param1);<br>}<br><br>

    Posted by: Harish G    

    Contact Harish G Contact Harish G

    Function Overriding:-<br> The functions having the same name,parameters but having different definitions is called function overriding. It basically deals with the concept of Inheritance.when a Base class having some function and the derived class of it having same function, then this creates a problem called function overriding.

    Posted by: Priyanshu Thukral    

    Contact Priyanshu Thukral Contact Priyanshu Thukral

    function overloading is a technic in the function has same name with different parameter.

    Posted by: rushikesh kulkarni    

    Contact rushikesh kulkarni Contact rushikesh kulkarni

    a function with same name can exist in 2 or more base class. now which function is used by derived class when it inherits the 2 classes is solved by overriding the function in derived class using (::) operator.

    Posted by: vaibhav panwar    

    Contact vaibhav panwar Contact vaibhav panwar

    In a program,if a base class is declared as virtual and derived class is declared as virtual.This redefinition of virtual in derived class is known as Function overriding(Parameters will b same)

    Posted by: amit    

    Contact amit Contact amit

    Function Overriding refers to modify the definition of the base class method into the derived class with the same name and signature.

    If we change the the definition of a method in a same class but with different signature then it is known as Function Overloading.

    Posted by: amit    

    Contact amit Contact amit

    The functions having same name, parameters but having different definitions is called function overriding

    Posted by: ps hemanth reddy    

    Contact ps hemanth reddy Contact ps hemanth reddy


    Posted by: PUNEET SHARMA GURGAON    


    If you have the better answer, then send it to us. We will display your answer after the approval.
    Rules to Post Answers in

  • There should not be any Spelling Mistakes.
  • There should not be any Gramatical Errors.
  • Answers must not contain any bad words.
  • Answers should not be the repeat of same answer, already approved.
  • Answer should be complete in itself.
  • Name :*
    Email Id :*
    Answer :*
    Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
    Process Verification  Enter the above shown code:*
    Inform me about updated answers to this question

    Related Questions
    View Answer
    What is the difference between an interface and abstract class?
    View Answer
    What is function overloading and operator overloading?
    View Answer
    What is virtual constructors/destructors?
    View Answer

    Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here - Best Freshers & Experienced Jobs Website.

    View ALL Operator Overloading in C++ Interview Questions

    User Options
    Sponsored Links

    Copyright ©2003-2015, All Rights Reserved.
    Privacy Policy | Terms and Conditions

    Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Dedicated Servers | C Interview Questions & Answers

    Testing Articles | Testing Books | Testing Certifications | Testing FAQs | Testing Downloads | Testing Interview Questions | Testing Jobs | Testing Training Institutes

    Cache = 0.09375 Seconds