Working example with char pointers