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 / mahendra giri

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

Is This Answer Correct ?    23 Yes 44 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a function in c?

1571


How many levels of indirection in pointers can you have in a single declaration?

1083


What is difference between constant pointer and constant variable?

1295


Why c is faster than c++?

1023


develop algorithms to add polynomials (i) in one variable

2159


What is the correct declaration of main?

1206


p*=(++q)++*--p when p=q=1 while(q<=6)

1752


Explain the difference between getch() and getche() in c?

991


What are terms in math?

1043


An instruction which is analysed and acted upon by the processor prior to the compiler going its work a) directive b) constructive c) constant d) absolute mode

1080


What is const keyword in c?

1157


Are negative numbers true in c?

1054


Does c have circular shift operators?

1229


What are the different types of objects used in c?

1023


Why do we use & in c?

992