practice of reverse a char array