Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Write a program to interchange two variables without using
the third variable?

Answer Posted / jisha. k.a

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("Enter two no");
scanf("%d%d",&a,&b);
a=a-b;
b=a+b;
a=b-a;
printf("After chanching no is =\n");
printf("a=%d b=%d",a,b);
getch();
}

Is This Answer Correct ?    34 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is console in c language?

1093


What is multidimensional arrays

1120


What does int main () mean?

1018


Tell us the use of fflush() function in c language?

1137


What is sizeof array in c?

1045


Explain what are compound statements?

1054


What are the benefits of c language?

1172


What is break in c?

1022


What type of function is main ()?

1038


What are run-time errors?

1112


Can a program have two main functions?

1115


How the c program is executed?

1144


What is the difference between malloc() and calloc()?

1832


When is the “void” keyword used in a function?

1494


What library is sizeof in c?

1084