CoolInterview.com - World's Largest Collection of Interview Questions
 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


  • INTERVIEW QUESTIONS LANGUAGES C++ DETAILS
    Question :
    What is function overloading and operator overloading?



    Category C++ Interview Questions
    Rating (4.8) By 4 users
    Added on 7/19/2006
    Views 2703
    Rate it!
    Answers:

    Function overloading: C++ enables several functions of the same name to be defined, as long as these functions have different sets of parameters (at least as far as their types are concerned). This capability is called function overloading. When an overloaded function is called, the C++ compiler selects the proper function by examining the number, types and order of the arguments in the call. Function overloading is commonly used to create several functions of the same name that perform similar tasks but on different data types.
    Operator overloading allows existing C++ operators to be redefined so that they work on objects of user-defined classes. Overloaded operators are syntactic sugar for equivalent function calls. They form a pleasant facade that doesn't add anything fundamental to the language (but they can improve understandability and reduce maintenance costs).



    Function overloading in implicit feature of C++.
    Though the operator overloading is also implicit feature of the C++, programmer need to write the operator function (either member function or non-member function) to give extra meaning to the operator.



     Posted by: mahendra    

    Contact mahendra  Contact mahendra


    If you have the better answer, then send it to us. We will display your answer after the approval.
    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
    Difference between realloc() and free()?


    View Answer
    What do you mean by binding of data and functions?


    View Answer
    What is friend function?


    View Answer
    What is public, protected & private?


    View Answer
    What is polymorphism? Explain with an example?


    View Answer
    What is a class?


    View Answer
    What is the difference between structures and classes in C++?
    View Answer
    What is an object?


    View Answer
    What is the difference between class and structure?


    View Answer
    We can overload assignment operator as a normal function.But we can not overload assignment operator as friend function why?



    View Answer

    Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

    Notify me when better answer is posted!
    Email:

    View ALL C++ Interview Questions

    User Options
    Sponsored Links


    Copyright ©2003-2009 CoolInterview.com, All Rights Reserved.
    Privacy Policy | Terms and Conditions
    Page URL: http://www.coolinterview.com/interview/6153/default.asp?cachecommand=bypass


    Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Dedicated Servers | Joke of the Day

    0.77