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
Why main is used in c?
Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.
How can I swap two values without using a temporary?
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
What is the argument of a function in c?
What is the best way of making my program efficient?
explain what are actual arguments?
Is c a great language, or what?
Explain how do you print an address?
What is the difference between memcpy and memmove?
What is I ++ in c programming?
What is the difference between NULL and NUL?
How can I sort a linked list?
When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?
Can we declare a function inside a function in c?