Program to Swap two numbers without using Temporary variable
#include<stdio.h>
void main()
{
int a,b;
printf("enter two numbers : ");
scanf("%d%d",&a,&b);
printf("number before swapping %d %d",a,b);
a = a+b;
b = a -b;
a = a - b;
printf("\nnumber after swapping %d %d ",a,b);
}
If You Liked This Post Please Take a Time To Share This Post
This link might help you .http://www.techycage.com/2014/12/swapping-of-two-numbers-logic.html
ReplyDeletebest solution of C program to swap two numbers
ReplyDeletehttp://programmergallery.com/c-program/c-program-swap-two-numbers.php
the link which u r given is error
ReplyDelete