Create datacmp.c

complete a reference sample in datacmp.c