c++ prorgram to reverse a string code example Example: Reverse string C++ reverse(str.begin(),str.end());