Sadly, very few people do.
What it does is notify you if you reached some logically incorrect state -e.g., if a pointer is NULL, you definitely do not want to continue.
// if expression evaluates to false, then the program aborts
// expression can be anything, say (if ptr != NULL)
If the expression does evaluate to false, then you get a message like “assert failed in function foo at line x” – rather useful. Better sprinkle all your code with this – anyway, you can turn it off in production executables by adding
in your code. An easier way – one that doesn’t require source modification – is to pass -DNDEBUG as a parameter when compiling the file.
gcc -c test.c -DNDEBUG