write a c program for greatest of three numbers without
using if statment
Answer Posted / suresh
main()
{
int a,b,c,big;
printf("enter 3 values");
scanf("%d %d %d", &a,&b,&c);
big= ((a>b)&&(a>c))? a :b>c?b:c;
printf("largest of 3 no's = %d",big);
}
Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
What is meant by inheritance?
Is that possible to add pointers to each other?
Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.
Is fortran still used in 2018?
How do I send escape sequences to control a terminal or other device?
What is the best way of making my program efficient?
What is the difference between fread buffer() and fwrite buffer()?
What are called c variables?
Can we replace the struct function in tree syntax with a union?
What is the use of putchar function?
what is the diffrenet bettwen HTTP and internet protocol
What is the difference between if else and switchstatement
How many data structures are there 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
Why do we use int main?