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 / shubham agarwal

the answer is simple

a=a*b;
b=a/b;
a=a/b;


this is one of the few possible ways to swap
simple app. of +,- can also brong the result


by
shubham agarwal
shubham.agarwal363@yahoo.com from NIT Srinagar

Is This Answer Correct ?    8 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is c procedural or object oriented?

1029


shorting algorithmS

2262


Explain output of printf("Hello World"-'A'+'B'); ?

1500


What is string length in c?

1110


What are disadvantages of C language.

1168


Is boolean a datatype in c?

1074


Explain what is the difference between functions abs() and fabs()?

1190


Is null always defined as 0(zero)?

1121


How would you obtain the current time and difference between two times?

1296


What is hungarian notation? Is it worthwhile?

1230


What does the message "automatic aggregate intialization is an ansi feature" mean?

1193


Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result

1910


How can I remove the leading spaces from a string?

1172


How macro execution is faster than function ?

1204


Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

2060