C++ Toys, testing bizarre things we can do with the compiler.
- C 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| file_comp_diff.c | ||
| if_speed.c | ||
| LICENSE | ||
| README.md | ||
| short-circuit.c | ||
C-Toys
C++ Toys, testing bizarre things we can do with the compiler.
Short Circuit
After a discussion with a friend who's also a developer... he argued that && inside if statements would evaluate even when one of them already failed. My argument was that at the first condition that evaluated false, the if statement would fail. So I created a simple test application to test such conditions. Precedence is important!
Speed Test
If test:
What's faster? using one if? or more than one if?... Check the results after compiling!. one if... I swear lol!
How to compile: g++ short-circuit.c
How to run: ./a.out