C++ String at()This function is used for accessing individual characters. SyntaxConsider a string str. To find the position of a particular character, its syntax would be Parameterspos : It defines the position of the character within the string. Return valueIt returns the character specified at that position. Example 1Output: String contains Welcome to javatpoint tutorial Example shows that we can access the characters by using either the member function at() or the subscript operator[ ].
Next TopicC++ Strings
|
JavaTpoint offers too many high quality services. Mail us on h[email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected].
Duration: 1 week to 2 week