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
What is the use of extern in c?
#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }
Calculate 1*2*3*____*n using recursive function??
Write the control statements in C language
Explain argument and its types.
Explain what is the benefit of using enum to declare a constant?
What does emoji p mean?
PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM
write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.
How do you write a program which produces its own source code as output?
Why flag is used in c?
How do we make a global variable accessible across files? Explain the extern keyword?
What are loops in c?
What are terms in math?
Is c language still used?