Improve C files.c example

Fix bugs and inconsistent coding style.