write a c program for greatest of three numbers without
using if statment
Answer Posted / sathishmani
void main()
{
int a=10,b=20,c=30,d;
d=((a>b)&&(a>c))?1:2;
switch(d)
{
case 1:
printf("%d",a);
break;
case 2:
d=(b>c)?b:c;
printf("%d",d);
break;
}
}
| Is This Answer Correct ? | 68 Yes | 21 No |
Post New Answer View All Answers
which of the following shows the correct hierarchy of arithmetic operations in C a) (), **, * or/,+ or - b) (),**,*,/,+,- c) (),**,/,*,+,- d) (),/ or *,- or +
What is an operator?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures
What is the difference between #include and #include 'file' ?
What are header files? What are their uses?
What is the difference between the expression “++a” and “a++”?
What is the use of function in c?
What is typeof in c?
Why structure is used in c?
What is the difference between text and binary i/o?
a c variable cannot start with a) an alphabet b) a number c) a special symbol d) both b and c above
What are the advantage of c language?
Explain do array subscripts always start with zero?
What is structure in c definition?
Iam a B.Tech graduate and completed my engineering in 2009, from 2005 to 2009 and after that i had done nothing.Now i want to do job and get into BPO field . Friends give me suggestions as what to say in interview... if they ask me that what would you had done ... these many years without doing job ??????? pls urgent