Question
What is function overloading? How it is different from function overriding? Explain with an example.
FUNCTION OVERLOADING
Answer :
Word Count : 143
____ __________ _________ __________ ____ ________ _____ ___ __________ ___ ______ ____.
_____ ________ ____ ______ _____ _____ ___ __________ ______ ____.
______ __________ ____ _____ _______.
______ ________ _________ ___ __________ _______ _______ ____.
____ ___ __________ _________ _______ __________ ________ ___ _____ _________ _____.
__________ _________ ______ _______ _______ ____ ______ ___ _______.
__________ ________ ______ ________ ______ ___ ____ _______ ______ _______.
_______ _____ ___ ______ __________.
___ ______ ______ __________ __________ _____ __________ __________ ______ ______ ________ _______.
_____ ________ ______ __________ _____ _____ _______.
__________ ____ _____ _______ ____ _____ _______ ______ _________.
___ __________ ________ _________ ______.
Skip in 10
More than one function having same name but different argument signature, is called function overloading.
Example:-
#include<iostream.h>
#include<conio.h>
class pixeles
{
int s;
public:
void sum(int x.int y)
{
s=x+y;
cout<<”result=”<<s;
}
void sum(int x,int y,int z)
{
s=x+y+z;
cout<<”result
_____ ________ ____ ______ _____ _____ ___ __________ ______ ____.
______ __________ ____ _____ _______.
______ ________ _________ ___ __________ _______ _______ ____.
____ ___ __________ _________ _______ __________ ________ ___ _____ _________ _____.
__________ _________ ______ _______ _______ ____ ______ ___ _______.
__________ ________ ______ ________ ______ ___ ____ _______ ______ _______.
_______ _____ ___ ______ __________.
___ ______ ______ __________ __________ _____ __________ __________ ______ ______ ________ _______.
_____ ________ ______ __________ _____ _____ _______.
__________ ____ _____ _______ ____ _____ _______ ______ _________.
___ __________ ________ _________ ______.
IGNOU ACADEMY
Your IGNOU journey, made easier.
- Solved Assignments
- Study Notes
- Guess Papers
- Question Papers
Continue Reading — It's Free
Sign in with Google to unlock more of this answer.
✓ Free access
✓ Unlock up to 60% of the answer
✓ No payment required
✓ Unlock up to 60% of the answer
✓ No payment required
Quick Google sign-in. No separate registration form.