Write a C program to find the smallest of three integers,
without using any of the comparision operators.
Answer Posted / niranjan
main()
{
int a=5,b=2,c=3; /*Assuming a Use Case */
int d; /* d is required a temporary variable */
if(!(a/b)&& !(a/c))
{
d = a; /* Which means a is small */
}
else if ( !(b/a)&&!(b/c))
{
d = b; /* Which means b is small */
}
else
{
d = c;
}
printf("%d",d);
}
| Is This Answer Correct ? | 7 Yes | 3 No |
Post New Answer View All Answers
How can variables be characterized?
How can you invoke another program from within a C program?
A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none
Where in memory are my variables stored?
In a byte, what is the maximum decimal number that you can accommodate?
hi any body pls give me company name interview conduct "c" language only
How can you access memory located at a certain address?
What are the 32 keywords in c?
What is a pointer on a pointer in c programming language?
What is "Duff's Device"?
Do you have any idea about the use of "auto" keyword?
Do you know pointer in c?
Why doesnt that code work?
Is array name a pointer?
What are the different types of C instructions?