Monday 26 April 2021

Function Parameter Matching and Overloading Qus - 4

 #include<iostream.h>

#include<conio.h>

void show(double a)

{

cout<<"double - "<<a<<endl;

}

int main()

{

clrscr();

show(5);     //conversion

show('k');  //coversion

show(6.7);  //promotion

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

getch();

return 0;


}

No comments:

Post a Comment