#include<stdio.h>
void anik(int *a,int *b)
{
int rob;
rob = *a;
*a = *b;
*b = rob;
}
int main()
{
int x, y;
printf("Enter x : ");
scanf("%d", &x);
printf("Enter y : ");
scanf("%d", &y);
anik(&x, &y);
printf("\nAfter Swapping : \n");
printf("x : %d\n", x);
printf("y : %d\n", y);
return 0;
}
void anik(int *a,int *b)
{
int rob;
rob = *a;
*a = *b;
*b = rob;
}
int main()
{
int x, y;
printf("Enter x : ");
scanf("%d", &x);
printf("Enter y : ");
scanf("%d", &y);
anik(&x, &y);
printf("\nAfter Swapping : \n");
printf("x : %d\n", x);
printf("y : %d\n", y);
return 0;
}
Comments
Post a Comment