C++ Toys, testing bizarre things we can do with the compiler.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2016-10-09 13:56:30 -05:00
file_comp_diff.c Add binary file comparison. 2016-10-09 13:56:30 -05:00
if_speed.c Added if speed test, updated Readme 2016-03-17 23:33:39 -03:00
LICENSE Initial commit 2016-03-17 22:33:48 -03:00
README.md Updated Readme 2016-03-17 23:34:53 -03:00
short-circuit.c Memory management 2016-03-17 22:54:39 -03:00

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

Suggest tests

mail@derekdemuro.com