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...

wat are the two methods for swapping two numbers without
using temp variable??

Answer Posted / shrikantauti

i dont know the methods but can give the code to swap values without temporary variable.
a b
a=a+b
b=a-b
a=a-b

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what is a static function?

1047


What is static and auto variables in c?

1021


#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }

1241


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

1869


#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??

1911


What do you mean by keywords in c?

1083


How can I write functions that take a variable number of arguments?

1076


Why ca not I do something like this?

971


write a c program to find the sum of five entered numbers using an array named number

2076


What is structure padding in c?

1058


What is infinite loop?

1029


A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles

1119


What are operators in c?

962


can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......

1809


What is a stream?

1078