Contents
Function overloading
Hello दोस्तों! आज मैं आपको इस पोस्ट में What Is Function overloading In Hindi के बारें में बताऊंगा, और इसके example को भी पढेंगे, तो चलिए शुरू करते हैं:-
Function overloading In Hindi? फंक्शन ओवरलोडिंग क्या है
Function overloading:-
overloading का अर्थ है किसी समान चीज को अलग- अलग propose के लिए use करना । C++ में इसे function Polymorphism कहा जाता है
Poly का अर्थ होता है many , morphism का अर्थ function से सम्बंधित है अर्थात की समान नाम के दो या दो से ज्यादा function के जरिए कई सारे task किये जा सकते हैं
Function overloading में compiler argument को match करके function को call करता है
what is function फंकशन क्या होते है
Example:-
#include <iostream>
Int area (int);…………1
Int area (int ,int)…….2
Int area (int ,int ,int)……3
Main()
{
Cout<<area(5);//1st is called
Cout<<area(5,10);//2nd is called
Cout<<area(5,10,15);//3rd is called
}
Int area (inta)
{
Return (a*a) ;
}
Int area (int x , int y )
{
Return (x*y);
}
Int area ( int l , int b ,int h)
{
Return (l*b*h);
}
निवेदन:- अगर आपके लिए यह आर्टिकल useful रहा हो तो इसे अपने दोस्तों और classmates के साथ अवश्य share कीजिये, और अन्य विषयों से related कोई question हो तो नीचे कमेंट के द्वारा बताइए. thanks.