What is the complexity of the begin() and end() methods of a
container? How do you think this is acheived?
Given a reversible container c1: { 3, 45, 765, 12 }, write a for loop that
will store the elements of c1 in another container, c2, in reverse
order. Write the code in such a way that it would work for any
reversible container c1, and any forward container, c2. Don't
worry about declaring the type of c1 and c2, and assume the element
types are the same and assignable. Just write the for loop.
Is a string a vector? If yes, in what way? If no, why not?
The following code has some bugs in it. Correct them:
string s;
int if;
cout << "Enter num: ";
cin >> if;
cout << "Enter some text: ";
getline(cin,s);
// text should be in string s