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
How do you print only part of a string?
How can I read data from data files with particular formats?
How can you increase the allowable number of simultaneously open files?
What are the header files used in c language?
What is the difference between c &c++?
Explain what are bus errors, memory faults, and core dumps?
What is pointer to pointer in c with example?
What is sizeof return in c?
What is the difference between array and pointer?
How many levels deep can include files be nested?
What is register variable in c language?
write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.
How do I use void main?
What does the format %10.2 mean when included in a printf statement?
What is a macro in c preprocessor?