#include<stdio.h>
void swap(int *a,int *b);
int main()
{
int a,b,temp;
printf("enter value of a");
scanf("%d", &a);
printf("enter value of b");
scanf("%d", &b);
swap(&a,&b);
printf("after swapping: a = %d, b = %d", a, b);
return 0;
}
void swap(int *a,int *b){
int temp=*a;
*a=*b;
*b=temp;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: