Regarding execution of conditional operator

39 views Asked by At

how the conditional operator executes in this printf statement

printf("%d==1 is ""%s",k,k==1?"TRUE":"FALSE");
1

There are 1 answers

0
haccks On

It will executed as normal as it should be.

if(k == 1)
    printf("%d==1 is %s",k,"TRUE");
else  
    printf("%d==1 is %s",k,"FALSE");