added test program in "test.c"