write a c program for greatest of three numbers without
using if statment

Answer Posted / ragu

int call();
void main()
{
int a,b,c,d;
printf("enter the values");
scanf("%d%d%d",&a,&b,&c);
d=call();
}
call()
{
return(a>b?a>c?a:c:b>c?b:c);
}

Is This Answer Correct ?    28 Yes 19 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is better oop or procedural?

634


What is zero based addressing?

715


What does *p++ do?

586


What does s c mean in text?

612


What is the method to save data in stack data structure type?

606






What is the purpose of sprintf?

620


Write program to remove duplicate in an array?

600


What do the functions atoi(), itoa() and gcvt() do?

724


Which header file is essential for using strcmp function?

943


Explain what does the format %10.2 mean when included in a printf statement?

781


Difference between pass by reference and pass by value?

658


What is enumerated data type in c?

627


What is a protocol in c?

559


What are the types of c language?

556


If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?

780