IBM interview question

Friend function virtual function reverse string