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

how to swap two integers 1 and 32767 without using third
variable

Answer Posted / riya ganguly

int a=1,b=32767;
a=a+b;
b=a-b;
a=a-b;
printf("a=%d,b=%d",a,b);

Is This Answer Correct ?    17 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between typedef and #define?

1067


I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.

2373


What is function prototype in c with example?

1096


How can I call a function with an argument list built up at run time?

1248


shorting algorithmS

2262


What is const keyword in c?

1167


What are header files and explain what are its uses in c programming?

1135


Explain what is a 'locale'?

1085


What is pointers in c with example?

1086


Is c procedural or functional?

1048


What will the preprocessor do for a program?

1082


What is c value paradox explain?

1103


What is the best way of making my program efficient?

1040


I have a varargs function which accepts a float parameter?

1057


What are the two types of structure?

1094