SlideShare a Scribd company logo
Method overloding
Disclaimer: This presentation is prepared by trainees of
baabtra as a part of mentoring program. This is not official
document of baabtra –Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .
Ltd
Typing Speed: 20
Typing Speed: 21

Muhammed shafi
shafi3949@gmail.com
Shafi breeze
Shafi breeze
in.linkedin.com/in/profilena
me
9961073949
TOPIC

Method overloading in C++
Method overloading
• Method overloading is a feature of C++ that
allows us to create multiple functions with the
same name, so long as they have different
parameters.
(a) sum (int,int,int);
sum (int,int);
• Here, the above function can be overloaded. Though
data type of arguments in both the functions are
similar but number of arguments are different.
(b) sum (int,int,int);
sum (float,float,float);
• Function overloading is the process of
using the same name for two or more
functions.
• The secret to overloading is that each
redefinition of the function must use
either• different types of parameters
• different number of parameters.
Example
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•

#include<iostream.h>
#include<conio.h>
float area(float); //function prototype
int area(int);
int area(int,int);
void main()
{
int a,l,b;
float r;
cout<<"Enter the radius of circle"<<endl;
cin>>r;
cout<<"Enter the side of square"<<endl;
cin>>a;
cout<<"Enter the length and breadth of rectangle"<<endl;
cin>>l>>b;
cout<<"Area of circle is "<<area(r)<<endl;
cout<<"Area of square is "<<area(a)<<endl;
cout<<"Area of rectangle is "<<area(l,b)<<endl;
getch();
}
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•

//functions
float area(float x)
{
float area;
area=3.14*x*x;
return(area);
}
int area(int x)
{
int area;
area=x*x;
return(area);
}
int area(int x,int y)
{
int area;
area=x*y;
return(area);
THE END
Create by Shafi
Contact Us
Emarald Mall (Big Bazar Building)
Mavoor Road, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550

Start up Village
Eranakulam,
Kerala, India.
Email: info@baabtra.com

NC Complex, Near Bus Stand
Mukkam, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550

More Related Content

PDF
Lesson 1 introduction to programming
PDF
Lesson 4.2 5th and 6th step
PDF
Lesson 4.1 completing the problem solving process
PDF
Lesson 3.1 variables and constant
PPTX
Function creation and function call in c
PDF
Lesson 5 .1 selection structure
PDF
Lesson 2 beginning the problem solving process
PDF
Lesson 3.2 data types for memory location
Lesson 1 introduction to programming
Lesson 4.2 5th and 6th step
Lesson 4.1 completing the problem solving process
Lesson 3.1 variables and constant
Function creation and function call in c
Lesson 5 .1 selection structure
Lesson 2 beginning the problem solving process
Lesson 3.2 data types for memory location

What's hot (6)

PPT
PPTX
Lesson 13 object and class
PPTX
Cocomo m odel
DOCX
Introduction to programming
PPTX
Programming in c (importance of c)
PPTX
New microsoft office power point presentation
Lesson 13 object and class
Cocomo m odel
Introduction to programming
Programming in c (importance of c)
New microsoft office power point presentation
Ad
Ad

Similar to Method overloding (20)

PPTX
oops.pptx
PPT
Polymorphism
PPTX
Function Overloading in C++ programming language
PPTX
Function_Overloading_in_CPP its uses and examples.
PPTX
PPTX
Function overloading and overriding
PPTX
2CPP11 - Method Overloading
PPTX
2CPP08 - Overloading and Overriding
PPTX
Operator Overloading & Function Overloading
PPTX
functions over-loading, over-hiding and over-riding
PPTX
Function overloading
PPTX
Method overloading in java
PDF
OOPS-Seminar.pdf
PPT
Functions in C++
PDF
03 function overloading
DOCX
Functions in c++
PPTX
Operator Overloading
PPTX
Presentation on polymorphism in c++.pptx
PPTX
Operator overloading (binary)
PPTX
function overloading
oops.pptx
Polymorphism
Function Overloading in C++ programming language
Function_Overloading_in_CPP its uses and examples.
Function overloading and overriding
2CPP11 - Method Overloading
2CPP08 - Overloading and Overriding
Operator Overloading & Function Overloading
functions over-loading, over-hiding and over-riding
Function overloading
Method overloading in java
OOPS-Seminar.pdf
Functions in C++
03 function overloading
Functions in c++
Operator Overloading
Presentation on polymorphism in c++.pptx
Operator overloading (binary)
function overloading

More from baabtra.com - No. 1 supplier of quality freshers (20)

PPTX
Agile methodology and scrum development
PDF
Acquiring new skills what you should know
PDF
Baabtra.com programming at school
PDF
99LMS for Enterprises - LMS that you will love
PPTX
Chapter 6 database normalisation
PPTX
Chapter 5 transactions and dcl statements
PPTX
Chapter 4 functions, views, indexing
PPTX
PPTX
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
PPTX
Chapter 1 introduction to sql server
PPTX
Chapter 1 introduction to sql server
Agile methodology and scrum development
Acquiring new skills what you should know
Baabtra.com programming at school
99LMS for Enterprises - LMS that you will love
Chapter 6 database normalisation
Chapter 5 transactions and dcl statements
Chapter 4 functions, views, indexing
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 1 introduction to sql server
Chapter 1 introduction to sql server

Recently uploaded (20)

PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
Cell Types and Its function , kingdom of life
PDF
Sports Quiz easy sports quiz sports quiz
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Insiders guide to clinical Medicine.pdf
PPTX
Pharma ospi slides which help in ospi learning
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
01-Introduction-to-Information-Management.pdf
PDF
RMMM.pdf make it easy to upload and study
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
GDM (1) (1).pptx small presentation for students
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Cell Types and Its function , kingdom of life
Sports Quiz easy sports quiz sports quiz
2.FourierTransform-ShortQuestionswithAnswers.pdf
O7-L3 Supply Chain Operations - ICLT Program
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Insiders guide to clinical Medicine.pdf
Pharma ospi slides which help in ospi learning
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Final Presentation General Medicine 03-08-2024.pptx
Supply Chain Operations Speaking Notes -ICLT Program
Microbial disease of the cardiovascular and lymphatic systems
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
01-Introduction-to-Information-Management.pdf
RMMM.pdf make it easy to upload and study
Renaissance Architecture: A Journey from Faith to Humanism
GDM (1) (1).pptx small presentation for students

Method overloding