1#include <iostream>
2#include <string.h>
3
4using namespace std;
5int main() {
6 string str1 = "Apples are red";
7 string str2 = str1.substr(11, 3);
8 string str3 = str1.substr(0, 6);
9
10 cout << "Substring starting at position 11 and length 3 is: " << str2 <<endl;
11 cout << "Substring starting at position 0 and length 6 is: " << str3;
12 return 0;
13}