#includeIn this example, we create a string "Hello world" and assign it to s. Next, we create a const char pointer c and assign it to the pointer returned by s.c_str(). Finally, we print the value of c using cout. The output should be "Hello world". Package library: stdlib.h and string.h which are part of the C library, which is included in the C++ standard library.#include using namespace std; int main() { string s = "Hello world"; const char *c = s.c_str(); cout << c << endl; return 0; }