Program is to find the maximum from two numbers:
Program is to find the maximum from two numbers entered by the user having pointer variable as parameter
void main()
{
clrscr();
int a,b,ans;
cout<<" enter the first number ";
cin>>a;
cout<<" enter the second number ";
cin>>b;
ans=*max(&a,&b);
cout<<" The maximum of two numbers is :"<
}
int *max(int *a,int *b)
{
if (*a>*b)
return a;
else
return b;
}