A cat has come face to face with a crocodile at a zoo and won.