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
Explain how can I write functions that take a variable number of arguments?
Can you please compare array with pointer?
Should I learn c before c++?
What is the difference between the local variable and global variable in c?
Where static variables are stored in c?
What is fflush() function?
What are the applications of c language?
What does the error message "DGROUP exceeds 64K" mean?
Explain enumerated types in c language?
Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]
Explain what is wrong with this program statement? Void = 10;
What are the types of pointers in c?
Why n++ execute faster than n+1 ?
What is an example of structure?
What is the difference between c and python?