An interview question on conditional operator
Posted
by nthrgeek
on Stack Overflow
See other posts from Stack Overflow
or by nthrgeek
Published on 2010-03-17T18:03:56Z
Indexed on
2010/03/17
18:11 UTC
Read the original article
Hit count: 346
I recently encountered with this question: How to reduce this expression: s>73?61:60;.
The hint given was that Instead of using conditional operator we could use a simple comparison which will work fine.
I am not sure but I think it is possible with some GCC extension,although I am unable to figure it out myself.
EDIT:The whole expression is this : s-=s>73?61:60
© Stack Overflow or respective owner