compare and print with const pointers