Let's look at the source of stdbool.h:
#define true 1
#define false 0
http://clang.llvm.org/doxygen/stdbool_8h_source.html #define true 1
#define false 0
http://clang.llvm.org/doxygen/stdbool_8h_source.html #define bool _Bool
Since bool wasn't reserved prior to C99, they use the _Bool keyword (which was reserved). [http://stackoverflow.com/questions/8724349/difference-betwee...]IMHO this:
bool is_valid(char* password);
is more clear than this: int is_valid(char* password);Furthermore as the examples are given in C, it is implied that the reader needs to be familiar with the language, and as a consequence, knowing about macros, should be if not a given, then at least required.
I'm glad that the OP at least made it a const char *password though, since that's also a must-have. Always const input pointers. And local temporaries. And everything else that you can const, except scalar arguments pretty much.