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

Does free set pointer to null?

953


1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

3632


What is table lookup in c?

1034


What is the c value paradox and how is it explained?

992


Can we access array using pointer in c language?

1041


How can you allocate arrays or structures bigger than 64K?

1083


What are the functions to open and close the file in c language?

986


In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.

1797


find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2

1955


Is there any data type in c with variable size?

1033


Write a Program to accept different goods with the number, price and date of purchase and display them

6146


What 'lex' does?

1101


What are keywords in c with examples?

1039


What are the different file extensions involved when programming in C?

1205


develop algorithms to add polynomials (i) in one variable

2109