Swapping using pointer C program

This Program swaps 2 numbers using pointers and functions . This is a part of  Mumbai University MCA Colleges C Program MCA sem 1

void swap(int*, int *);
void main()
int a,b;
printf("Enter 2 nos\n");
scanf("%d %d",&a, &b);
printf("\nBefore swapping: %d %d",a,b);
swap(&a, &b);
printf("\n After swaping: %d %d",a,b);
void swap(int *x,int *y)
int t;

Hope this Program is useful to you in some sense or other. Keep on following this blog for more Mumbai University MCA College Programs. Happy Programming and Studying.

No comments:

Post a Comment