#include
#include
void swap(int*a,int*b);
void main()
{
int a,b;
clrscr();
printf("Enter the value of a and b is:");
scanf("%d%d",&a,&b);
printf("\n Before swapping");
printf("\n The given value of a is %d",a);
printf("The given value of b is %d",b);
swap(&a,&b);
printf("\n After swapping");
printf("\n The given value of a is %d",a);
printf("\n The given value of b is%d",b);
getch();
}
void swap(int*a,int*b);
{
int temp;
temp=*a;
*a=*b;
*b=temp;
}
1 Comments
https://www.google.bf/url?q=https%3A%2F%2Fcodedlist.com%2F
ReplyDeletehttps://www.google.bg/url?q=https%3A%2F%2Fcodedlist.com%2F
https://www.google.com.bh/url?q=https%3A%2F%2Fcodedlist.com%2F
https://www.google.bi/url?q=https%3A%2F%2Fcodedlist.com%2F
https://www.google.bj/url?q=https%3A%2F%2Fcodedlist.com%2F