PROGRAM TO SHOW CONCEPT OF SWAPPING USING FUNCTION
/* PROGRAM TO SHOW CONCEPT OF SWAPPING USING FUNCTION */ #include<stdio.h> #include<conio.h> void swap(int a,int b); void main() { int a,b; clrscr(); printf(“ENTER THE VALUE OF A :”); scanf(“%d”,&a); printf(“ENTER THE VALUE OF B :”); scanf(“%d”,&b); swap(a,b); getch(); } void swap(int x,int y) { int temp; temp=x; x=y; y=temp; printf(“\nAFTER SWAPPING\n”); printf(“\nA :%d “,x); printf(“\nB […]
Continue Reading