What is the shortest statement you can write in C or C++ programming language to express the following statement?
a = (a == 0 ? 0 : 1);
What is the shortest statement you can write in C or C++ programming language to express the following statement?
a = (a == 0 ? 0 : 1);
Please email your solutions to puzzles@cotpi.com.
This puzzle is taken from folklore.
Mark Brader solved this puzzle:
Oh, everybody knows that.
a=!!a;