Substring

How do substrings work in the following C++ code?
How does substring work in C? The substr() function returns the substring of a given string between two given indices. It returns the substring of the...