Write a C program to find the smallest of three integers,
without using any of the comparision operators.
Answer Posted / srinivas
#include <stdio.h>
int main(void)
{
int a = 10, b = 2, c = 30, result;
result = a < b ? ((a < c) ? a: c) : ((b < c) ? b : c);
printf("%d\n",result);
return 0;
}
Is This Answer Correct ? | 9 Yes | 3 No |
Post New Answer View All Answers
Can you please explain the scope of static variables?
Why doesnt the call scanf work?
What is conio h in c?
What are global variables and explain how do you declare them?
Which is best linux os?
How do you search data in a data file using random access method?
How can I dynamically allocate arrays?
How can I use a preprocessorif expression to ?
What does void main () mean?
Why we use void main in c?
What is the use of clrscr?
What is a memory leak? How to avoid it?
Write a program to identify if a given binary tree is balanced or not.
What is c basic?
How to get string length of given string in c?