Monday 26 April 2021

Function Parameter Matching and Overloading Qus - 2

 #include<iostream.h>

#include<conio.h>

void show(char a)

{

cout<<"char - "<<a<<endl;

}

int main()

{

clrscr();

show(65);     //Conversion

show('k');  //Exact Match

show(66.7);  //coversion

//show();      //No Match - Error

getch();

return 0;


}

No comments:

Post a Comment