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
Write a program of prime number using recursion.
Write a program to check palindrome number in c programming?
difference between Low, Middle, High Level languages in c ?
What is the sizeof () a pointer?
I need previous papers of CSC.......plz help out by posting them.......
What is operator precedence?
find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }
How can I invoke another program or command and trap its output?
What is a lookup table in c?
Where in memory are my variables stored?
Explain how do you declare an array that will hold more than 64kb of data?
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
What is a scope resolution operator in c?
What is union and structure in c?
What is the difference between void main and main in c?