Consider the following program fragment.
vector<int> A(10); A.push_back( 5000 );
At the end of an execution of this fragment, the size of vector A is
Consider the following code fragment, where L is a linked list of integers.
for( it = L.begin(); it != L.end(); ++it ) *it += 10;
Execution of this fragment has the effect of
Consider the following code fragment.
Rotate( list<int>& L, int r ) { for( int i = 0; i < r; i++ ) { L.push_back( L.front() ); L.pop_front(); } }
What, if anything, is wrong with using this fragment to rotate a list L?
Assume that L is an STL list object. Consider the following statement.
while( L.size() > 0 ) { ... }
Which of the following most accurately describes what is wrong with that statement?