C/C++ code
#include <iostream>
#include <string>
using namespace std;
int main()
{
string str1="Hello";
char *str2=const_cast<char*>(str1.c_str());
cout<<str2;
return 0;
}
#include <iostream>
#include <string>
using namespace std;
int main()
{
string str1="Hello";
char *str2=const_cast<char*>(str1.c_str());
cout<<str2;
return 0;
}