use printf to simplify output

test-strncmp is modified