Program to swap two numbers
#include<stdio.h> main() { int C,D,temp; printf("enter values for C and D\n"); scanf("%d%d",&C,&D); C=(C+D); D=(C-D); C=(C-D); //temp=C; //C=D; //D=temp; printf("c=%d d=%d\n",C,D); }OutPut:
enter values for C and D 10 20 c=20 d=10