Here we written code for to check biggest among the two numbers using Ternary operator.
For improvement of your coding skills we give some tasks along this. If you solve this tasks and send to our email (onlineexamshubteam@gmail.com) with your details. we will display your details(like Name, City, college, photo) in our site.
Task : Write a c program to check given number is even or odd using Ternary operator.
Write a C Program to demonstrate Conditional operator.
#include<stdio.h>
int main()
{
int a ,b;
printf(“Enter two numbers : \n”);
scanf(“%d %d”,&a,&b);
a>b?printf(“Frist is BIG \n”) : printf(“Second is BIG\n”);
return 0;
}
Output :
Enter two numbers :
618 811
Second is BIG
Task Achievers