C++ Program .Write a program to call by reference.

#include<stdio.h>
#include<conio.h>
void swap(int *a,int *b);
void main()
{
int a,b;
clrscr();
printf("\n enter the value of a");
scanf("\n %d",&a);
printf("\n Enter the value of b");
scanf("\n %d",&b);
swap(&a,&b);
getch();
}
void swap(int *a1,int *b1)
{
int temp;
temp=*a1;
*a1=*b1;
*b1=temp;
printf("\n swapped value a1 is %d",*a1);
printf("\n swapped value b1 is %d",*b1);
}