Program to swap to numbers without using third variable in c language

program:-

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
printf(“Enter two numbers”);
scanf(“%d%d”,&a,&b);
a=a+b;
b=ab;
a=ab;
printf(“first number=%d and second number=%d”,a,b);
getch();
}


4 thoughts on “Program to swap to numbers without using third variable in c language

Leave a Reply

Your email address will not be published.