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...

How to swap values between two variables without using a
third variable?

Answer Posted / gourab varma

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("enter value of a and b");
scanf("%d%d", &a,&b);
a=a+b;
b=a-b;
a=a-b;
printf("the value of a=%d\n the value of b is=%d", a, b);
getch();
}

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When we use Windows authentication mode

1989


Plz sent me in .net 2.0 interview Question & answers?

2082


Have you used callsymputx? what points need to be kept in mind when using it?

1925


9.Difference between even and odd signals?explain with the diagram?

3332


Write a program to create a process in UNIX

2492


Where do we need Operator overloading?

1065


Delta 5 weight scale not connect with oracle application what i can do?

2267


sample and simple coding where we get?

2232


What is %Type,%Rowtype?

2224


why we use mantis? what u mean mantis in IT trends? addvantages of mantis?

2160


How to call a C++ function which is compiled with C++ compiler in C code?

1251


details description on this mantis? who is founder of this mantis?

2073


Define Form modules, Class modules and Standard modules

1986


When you deliver your C++ headers and C++ library of a class (what all can you change in the class so that application using your class does not need to recompile the code)

1126


what are resources in case of Threads

2211