-
-
Save programmingfaster0226/400b3d68c505ff79c00d7a4b9d3aff06 to your computer and use it in GitHub Desktop.
proggrammingfaster.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<conio.h> | |
void main() | |
{ | |
int a,b,temp; | |
int *ptra=&a,*ptrb=&b; | |
printf("enter any two numbers:"); | |
scanf("%d%d",ptra,ptrb); | |
printf("before swapping a=%d\n b=%d\n",*ptra,*ptrb); | |
temp=*ptra; | |
*ptra=*ptrb; | |
*ptrb=temp; | |
printf("after swapping a=%d\n b=%d\n",*ptra,*ptrb); | |
getch(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment