{ A destination to learn coding }

Code to swap two humbers without using third variable.


#include <stdio.h>
int main()
{
  int a,b;
  printf("Enter two numbers\n");
  scanf("%d%d",&a,&b);
  a+=b; //This is a short-hand operator. Learn more about it.
  b=a-b;
  a-=b;
  
  printf("Value of a is %d\n",a);
  printf("Value of b is %d\n",b);
  return 0;
 }