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 / deepa.n

#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=b/a;
printf("After chanching no is =\n");
printf("a=%d b=%d",a,b);
getch();
}

Is This Answer Correct ?    15 Yes 26 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you construct an increment statement or decrement statement in C?

1240


What are multidimensional arrays?

1126


What is a loop?

1070


What are the different types of linkage exist in c?

1035


any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above

1143


How can I make it pause before closing the program output window?

1045


What is int main () in c?

1093


Can a pointer be static?

1091


What is 1d array in c?

1101


What does a pointer variable always consist of?

1107


What are the types of data types and explain?

1094


What are the data types present in c?

1168


What is use of pointer?

1094


What is a struct c#?

1060


Explain how do you override a defined macro?

1083