Thursday 7 September 2017

Write a C program to find largest 3 number with conditional operator without using if statement.

Write a program to find largest 3 number with conditional operator without  using if statement with C language.

Answer:-
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c, big;

clrscr();
printf("Enter three value--->");
scanf("%d%d%d",&a,&b,&c);
big=a>b?(a>c?a:c):(b>c?b:c);
printf(\n Largest bumber is ---->%d",big);


getch();
}



C programming Interview questions and answers.
C language interview questions solution for freshers beginners placement tricky good pointers answers explanation operators data types arrays structures functions recursion processors looping file handling strings switch case if else printf advance linud objective mcq faq online written test prime numbers Armstrong Fibonacci series factorial palindrome code programs examples on c and c++ tutorials and pdf.

No comments:

Post a Comment