Javatpoint Logo
Javatpoint Logo

C++ String crbegin()

The crbegin() function stands for 'reverse beginning'. This function references to the last character of the string.

Syntax

Consider a string str. Syntax would be:

Parameter

This function does not contain any parameter.

Return value

This function returns the constant iterator pointing to the last character of the string.

Example 1

Let's see the simple example of crbegin() function:

Output:

rewolF sutoL

This example shows how to reverse the string using crbegin() function.

Example 2

Output:

54321

This example shows how to get the reverse list using crbegin() function.


Next TopicC++ Strings




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


B.Tech / MCA