C++ String c_str()This function returns a pointer to an array that contains null terminated sequence of characters. SyntaxConsider a string str. Syntax would be: ParameterIt does not contain any parameter. Return valueIt returns a pointer to the c-string representation of the string object's value. ExampleLet's see the simple example. Output: String value is: Computer is my favorite subject Next TopicC++ Strings |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India