As I write programs, mainly in C++, I document them using the Doxygen tool. This is a very powerful parser that is capable to finding functions, variables, macros, and many other things in the source code and attach the corresponding documentation to those functions, variables, macros, etc.
This is extremly practical when creating large projects or libraries that you want to share with others.
One problem though, by default it seems like global functions (and thus C functions) and variables do not make it to the documentation, when C++ classes work fine.
There are two potential issues: