Top 10 Programming Language to learn in 2023

Are you a programming enthusiast looking to stay ahead of the curve in 2023? With the ever-evolving tech landscape, keeping up with the Best Programming Language to learn can be a daunting task. Fear not, as we have compiled a list of the top 10 Programming Languages that you should consider learning in 2023. Python: This versatile language continues to dominate in 2023, with its ease of use, readability, and a vast library of modules. JavaScript: As web development grows increasingly popular, JavaScript remains a crucial player, with its ability to create dynamic and interactive web pages. Java: This language has stood the test of time and remains a popular choice for enterprise software development. C++: A staple in the gaming and systems development industries, C++ offers exceptional performance and memory management. Swift: Apple's preferred language for iOS app development, Swift continues to grow in popularity with its simplicity and reliability. R: As data science and machin...

Function overloading in C++ | C++ Programming

Function overloading in C++ Programming

Overloading refers to the use of the same thing for a different purpose. When the same  function name is used for different tasks this is known as function overloading. Function overloading is one of the important features of C++ and any other OO languages.

When an overloaded function is called the function with matching arguments and return type is invoked. e.g.
void border(); //function with no arguments
void border(int ); // function with one int argument
void border(float); //function with one float argument
void border(int, float);// function with one int and one float arguments

 For overloading a function prototype for each and the definition for each function that share same name is compulsory.

//function overloading
//multiple function with same name

#include<iostream.h>
#include<conio.h>
int max(int ,int);
long max(long, long);
float max(float,float);
char max(char,char);
void main()
{  
return(i1>i2?i1:i2);
}
int i1=15,i2=20;    
cout<<"Greater is "<<max(i1,i2) <<endl;   
long l1=40000, l2=38000;   
cout<<"Greater is "<<max(l1,l2) <<endl;    
float f1=55.05, f2=67.777;    
cout<<"Greater is "<<max(f1,f2) <<endl;    
char c1='a',c2='A';    
cout<<"Greater is "<<max(c1,c2) <<endl;    
getch();
}
int max(int i1, int i2)
{  
long max(long l1, long l2)
{  
return(l1>l2?l1:l2);
}
float max(float f1, float f2)
{  
return(f1>f2?f1:f2);
}
char max(char c1, char c2)
{  
return(c1>c2?c1:c2);
}

Comments

Popular posts from this blog

Array in C Programming | C Programming

C program to Find Cartesian Product of Two Sets | C programming

What is System? | SAD