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 many ways are there to swap two numbers without using
temporary variable? Give the each logic.

Answer Posted / kishan gowda

One more method its bit complicated from the people from
the non electronics background......
void main()
{
pf(" a and b ");
sf("%d %d", &a, &b);
a= a^b;
b= b^a;
a= a^b;
pf("Swapped no's are a=%d and b=%d" ,a ,b);
}

Is This Answer Correct ?    24 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

int far *near * p; means

3621


hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..

1958


How many types of arrays are there in c?

1083


What does the function toupper() do?

1192


What are pointers? What are stacks and queues?

1217


Explain what are compound statements?

1103


program to find out date after adding 31 days to a date in the month of febraury also consider the leap year

3146


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

1272


What is character set?

1216


In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping

1596


Can main () be called recursively?

1176


What is the difference between text and binary modes?

1240


How many loops are there in c?

1163


Where is c used?

1154


to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?

2248