TODAY JAVA SCHOOL

In java school, programming, design, computer general knowledge, web application, software, web services, social media, digital marketing, oops, concept of programming language, oops feature, console media, graphics medium, first programming, c, c ++ , Java, PHP, SQL, MySQL, HTML, HTML_5, J_query, JavaScript, Bootstrap, Framework, images with logos, examples, shared and explained.

https://www.amazon.in/b?node=26373545031&linkCode=ll2&tag=1234567801cdb-21&linkId=3b9882431b00409b44141e0344b35a15&language=en_IN&ref_=as_li_ss_tl

Breaking

Monday 24 August 2020

Function Overloading In C++ | Program Of Function Overloading In C++ | Explain Function Overloading In C++ | Function Overloading In C++ In Hindi

 

Function Overloading In C++

Function overloading is a feature in C++ where two or more functions can have the same name but different parameters.


image of Function Overloading In C++

Fig: Function Overloading In C++ 


Program:

#include <iostream>

#include<conio.h>

void print(int i) {

cout << " Here is int " << i << endl;

}

void print(double f) {

cout << " Here is float " << f << endl;

}

void print(char const *c) {

cout << " Here is char* " << c << endl;

}

void main() {

print(10);

print(10.10);

print("ten");

getch();

}


Output:

Here is int 10

Here is float 10.1

Here is char* ten

No comments:

Post a Comment