Conditional operators in c-: In c language provide a special type operators. A ternary operators pair in “?” is available in c language its called a conditional operators for example if we have 3 condition we can use this operators
expression 1 ? expression 2 : expression 3
The operators “?” works as like here first expression is evaluated if it is not =0, then expression 2 is evaluated and become the value of the expression. If expression 1 is false then expression 3 is evaluated and its value become the value is expression.
Example-: a=10; b=15; c=(a>b) ? a:b; in this example if … else statement is follow as like if(a>b) c=a; else x=b;