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 find minimum between three no.s whithout
using comparison operator.

Answer Posted / ashutosh tiwari

if((a-b)&0x8000)
if((a-c)&0x8000)
printf("a is smaller");
else if((a-c)&0x7fff)
printf("c is smaller");
else
printf("a & c are equal & smaller");
else if((a-b)&0x7fff)
if((b-c)&0x8000)
printf("b is smaller");
else if((b-c)&0x7fff)
printf("c is smaller");
else
printf("b & c are equal & smaller");
else
if((b-c)&0x8000)
printf("b is smaller");
else if((b-c)&0x7fff)
printf("c is smaller");
else
printf("a, b & c are equal & smaller");

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

1074


Can you please compare array with pointer?

1079


Should I learn c before c++?

1227


What is the difference between the local variable and global variable in c?

961


Where static variables are stored in c?

1105


What is fflush() function?

1131


What are the applications of c language?

1073


What does the error message "DGROUP exceeds 64K" mean?

1215


Explain enumerated types in c language?

1046


Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]

1076


Explain what is wrong with this program statement? Void = 10;

1256


What are the types of pointers in c?

1022


Why n++ execute faster than n+1 ?

2987


What is an example of structure?

1039


What is the difference between c and python?

1165