site icon

C

fun little things I keep forgetting about C

1 == 1

evaluates to 1

0 == 1

evaluates to 0

When a method returns 0 it generally means success, and 1 means failure. Using the EXIT_SUCCESS and EXIT_FAILURE macros from <stdlib.h> is prerred.