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 calloc malloc realloc in c?

0 Answers  


i have a written test for microland please give me test pattern

0 Answers   Microland,


State the difference between x3 and x[3].

0 Answers   Aricent,


fn f(x) { if(x<=0) return; else f(x-1)+x; }

5 Answers   HCL,


#include<stdio.h> { printf("Hello"); } how compile time affects when we add additional header file <conio.h>.

0 Answers  






What will be printed as the result of the operation below: #include<..> int x; int modifyvalue() { return(x+=10); } int changevalue(int x) { return(x+=1); } void main() { int x=10; x++; changevalue(x); x++; modifyvalue(); printf("First output:%d\n",x); x++; changevalue(x); printf("Second output:%d\n",x); modifyvalue(); printf("Third output:%d\n",x); }

2 Answers  


what is an inline fuction??

2 Answers  


11. Look at the Code: #include<string.h> void main() { char s1[]="abcd"; char s2[10]; char s3[]="efgh"; int i; clrscr(); i=strcmp(strcat(s3,ctrcpy(s2,s1))strcat(s3,"abcd")); printf("%d",i); } What will be the output? A)No output B) A Non Integer C)0 D) Garbage

7 Answers   Accenture,


What is d'n in c?

0 Answers  


Explain why c is faster than c++?

0 Answers  


Implement bit Array in C.

0 Answers   GrapeCity,


What will be the result of the following C language program? main() { int a = 0; int b = 20; char x = 1; char y = 10; if(a,b,x,y) printf("Welcome"); }

1 Answers  


Categories