What is ternary operator? Is any such operator available in C language? If yes, explain with an example?

In C ternary operator is available and is denoted by symbol? :

A traditional C statement and its equivalent C ternary construct is shown below :

If A==0
X=1
Else X=0;
X=A==0? 1:0;

Post a Comment

0 Comments