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 |
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