Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
proggrammingfaster.com
#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
You can’t perform that action at this time.