C Puzzle-2
value = a? b: c
Write the code which implements the same logic without using conditional statements?
Answer:
value = (!!a)*b+(1-!!a)*c
Write the code which implements the same logic without using conditional statements?
Answer:
value = (!!a)*b+(1-!!a)*c
Comments
Post a Comment