Conditional operators return one value if condition is true and returns another value is condition is false. This operator is also called as ternary operator as it takes three arguments.
Syntax :
(Condition? true_value: false_value);
Example:
#include<stdio.h>
#include<conio.h>
void main() {
int i;
clrscr();
printf("Enter a number:");
scanf("%d",&i);
i%2==0?printf("%d is even",i):printf("%d is odd",i) ;
getch();
}