various snippets of C code