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

struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer

1260


What are the types of bitwise operator?

1072


main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }

1113


Is it possible to pass an entire structure to functions?

961


What is scope rule in c?

1035


Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?

1043


What is a pointer in c plus plus?

1265


What type is sizeof?

1017


What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

1080


What is signed and unsigned?

1034


What is ## preprocessor operator in c?

1056


What is the difference between strcpy() and memcpy() function in c programming?

1047


why do some people write if(0 == x) instead of if(x == 0)?

1033


Explain what is wrong with this program statement?

1088


Can we increase size of array in c?

940