C code snippets and experiments