Consider the execution of the following.
list<int> A(10);
Which of the following accurately describes what is created?
list<int> A(10,20);
Consider the following code fragment.
stack<int> S; S.push(123); S.push(456);
Now consider the following statement.
cout << S.pop() << endl;
Which of the following most accurately describes what goes wrong when that statement is executed?
Execution of the code fragment
stack<int,vector<int> > S;
does which of the following?
For an STL iterator it, execution of the statement
it
++it;
Increase by 1 the size of the container pointed to by it.
li st<int>::const_iterator it; for( it = L.begin(); it != L.end(); ++it ) *it = 0;
What is syntactically wrong with this fragment?
The STL contains a general purpose search function:
find( first, last, x );
What does find return if it finds item x?
What does find return if it fails to find item x?
Consider the following statement using the STL sort() routine.
sort( A.begin(), A.end(), f );
Which of the following most accurately describes the result of executing this statement?