add test.c

add a C source file for test.