Skip to content

Instantly share code, notes, and snippets.

@Computer-Code-C
Created July 28, 2020 14:18
Show Gist options
  • Save Computer-Code-C/e28472e0f3db859343a014634a568abc to your computer and use it in GitHub Desktop.
Save Computer-Code-C/e28472e0f3db859343a014634a568abc to your computer and use it in GitHub Desktop.
//Match through integral promotion in Function overloading
#include<iostream>
using namespace std;
void f(int a)
{
cout<<"Function 1 called";
}
void f(long int a)
{
cout<<"Function 2 called";
}
int main()
{
f('a'); // char type promoted to int
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment