Conditional Expression in C programming Language is look like:
-If condition is True then X will return otherwise Y return.
(1==1)?2:3 // return 2
(1==8)?2:3 // return 3
-In this program, we have a integer variable i.e. a=1
-(a==1) will become True that's by it execute first part and return 2 that will store in 'ans' variable.
-Then we will print the 'ans' variable,output is 2.