C typedef basics
By Peter
If c is not your first language, you will really miss boolean primitive type. In other languages boolean is already defined, but in c there is no such type, it is actually using integer values instead.
It is really simple to implement a boolean value with typedef:
Other option is to include stdbool.h.
Using typedef as an alias makes code more readable.
The example above shows that accessing the values is along the same rules as using struct.