Create check.c

the file used to test the new function.