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 swap Two numbers without using temp variable.

Answer Posted / prasanna

Swapping two variables in a single line with no temporary
variable..

b=(a+b)-(a=b);

so.. simple..

Prasanna. (prasanna7287@yahoo.co.in)

Is This Answer Correct ?    351 Yes 140 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is volatile variable in c with example?

1035


Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.

1093


What happens if a header file is included twice?

1034


What is quick sort in c?

1082


Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"

2070


What is wrong with this program statement? void = 10;

1246


What is the return type of sizeof?

1061


Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above

1135


a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor

1083


how to find binary of number?

4429


Explain about C function prototype?

1079


HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????

2686


where are auto variables stored? What are the characteristics of an auto variable?

1065


What is the difference between printf and scanf )?

1086


Explain what is the difference between functions getch() and getche()?

1047