52.
What are Container Adaptors?

53.
What are Unordered Associative Containers?

55.
What will be the output of the following C++ code?
#include <iostream>
#include <vector>
using namespace std;
int main()
{
    vector<int> v;
    v.assign( 10, 42 );
    for (int i = 0; i < v.size(); i++) 
    {
        cout << v[i] << " ";
    }
}

57.
What will be the output of the following C++ code?
#include <stdio.h>    
#include <stdlib.h>
int main ()
{
    char s[] = "365.24 29.53";
    char* p;
    double d1, d2;
    d1 = strtod (s, &p);
    d2 = strtod (p, NULL);
    printf ("%.2f\n", d1/d2);
    return 0;
}

58.
What will be the output of the following C++ code?
#include <iostream>
#include <list>
#include <queue>
using namespace std;
int main()
{
    queue<char> q;
    q.push('a');
    q.push('b');
    q.push('c');
    cout << q.front();
    q.pop();
    cout << q.front();
    q.pop();
    cout << q.front();
    q.pop();
}

59.
What will be the output of the following C++ code?
#include <list>
#include <string>
#include <iostream>
using namespace std ;
typedef list<string> LISTSTR; 
int main()
{
    LISTSTR :: iterator i;
    LISTSTR test;
    test.insert(test.end(), "one");
    test.insert(test.end(), "two");
    LISTSTR test2(test);
    LISTSTR test3(3, "three");
    LISTSTR test4(++test3.begin(),
    test3.end());
    cout << "test:";
    for (i =  test.begin(); i != test.end(); ++i)
        cout << " " << *i << endl;
    cout << "test:";
    for (i =  test2.begin(); i != test2.end(); ++i)
        cout << " " << *i << endl;
    cout << "test:";
    for (i =  test3.begin(); i != test3.end(); ++i)
        cout << " " << *i << endl;
    cout << "test:";
    for (i =  test4.begin(); i != test4.end(); ++i)
        cout << " " << *i << endl;
}

Read More Section(Standard Template Library (STL) in C plus plus)

Each Section contains maximum 100 MCQs question on Standard Template Library (STL) in C plus plus. To get more questions visit other sections.