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 is=”<<s;
}
};
_____ __________ __________ ___ _______.
___ ________ ___ __________ __________ ______ ______ __________.
________ ________ _______ _______ ______ _______ ___ ___ _____ ______ __________ _____.
_____ _______ ______ ________ _________ ____ ________ _____ ____ ___.
_____ _________ _____ _________ ___ _______ _________ ______ ______ ________.
__________ ___ __________ ___ _______ ______ ___ _________.
____ _____ ____ ___ _______ __________ __________ _____.
____ ________ _______ _______ ________ _________ ____ ________ ______ ____.
_______ __________ ______ ___ ___ _________.
_______ ______ ________ ________ ________ __________ _____ ___ __________ ______ __________ ______.
_____.
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.