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

In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.

1855


Why functions are used in c?

1142


What language is c written?

1056


What 'lex' does?

1188


Differentiate between a for loop and a while loop? What are it uses?

1189


What is nested structure?

1049


What is the difference between single charater constant and string constant?

1095


How can you return multiple values from a function?

1122


What is sizeof array in c?

1062


What does struct node * mean?

1024


What is the difference between array and structure in c?

1173


What does dm mean sexually?

1323


What is return type in c?

1141


What is wrong in this statement? scanf(ā€œ%dā€,whatnumber);

1245


Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.

1339