write a c program to find largest of three numbers using simple if only for one time.



write a c program to find largest of three numbers using simple if only for one time...

Answer / 1160

#include<stdio.h>
#include<conio.h>
int main()
{
int a,b,c,max;
scanf("%d %d %d",&a,&b,&c);
if (a>b && a>c)
{
printf("%d",a);
}
max=(b>c)&&(c>a)?printf("%d",b):printf("%d",c);
return max;
}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

What is maximum size of array in c?

0 Answers  


Explain logical errors? Compare with syntax errors.

0 Answers  


declare afunction pointer to int printf(char *)?

1 Answers   HCL,


Explain what is the benefit of using enum to declare a constant?

0 Answers  


#include<stdio.h> int SumElement(int *,int); void main(void) { int x[10]; int i=10; for(;i;) { i--; *(x+i)=i; } printf("%d",SumElement(x,10)); } int SumElement(int array[],int size) { int i=0; float sum=0; for(;i<size;i++) sum+=array[i]; return sum; } output?

5 Answers   Ramco,






What are the 32 keywords in c?

0 Answers  


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. The Logic should be written in Data Structures?

0 Answers   KPIT,


what is difference between array of characters and string

18 Answers   Accenture, Nest,


Differentiate Source Codes from Object Codes

1 Answers  


When c language was developed?

0 Answers  


pgm to find middle element of linklist(in efficent manner)

4 Answers   Huawei,


What is openmp in c?

0 Answers  


Categories