Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@programmingfaster0226
Created February 21, 2018 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save programmingfaster0226/400b3d68c505ff79c00d7a4b9d3aff06 to your computer and use it in GitHub Desktop.
Save programmingfaster0226/400b3d68c505ff79c00d7a4b9d3aff06 to your computer and use it in GitHub Desktop.
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