IBM interview question

Write string program using c++