biggest of two no's with out using if condition statement
Answer Posted / k.anand
#define myabs(a,b) a>b?(a-b):(b-a)
int main()
{
int a,b;
int biggest=0;
scanf("%d%d",&a,&b);
biggest=(a+b+myabs(a,b))/2;
printf("%d",biggest);
}
| Is This Answer Correct ? | 6 Yes | 7 No |
Post New Answer View All Answers
What is the translation phases used in c language?
What is the hardest programming language?
What is a floating point in c?
What do you mean by invalid pointer arithmetic?
the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above
Is main a keyword in c?
int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer
What is nested structure with example?
What is a macro?
Explain a file operation in C with an example.
in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above
What is a char in c?
What do you mean by a local block?
What does %c do in c?
How to declare a variable?